Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Create a bash shell script that reads a line from the user
consisting of 5 words and then prints them out in reverse
order. Name this script "reverse.sh"



Create a bash shell script that reads a line from the user consisting of 5 words and then prints th..

Answer / priyanka joshi

read line;
echo $line | awk '{ for ( i = NF; i > 0; i--) print $i}' |
tr "\n" " "

Is This Answer Correct ?    5 Yes 5 No

Post New Answer

More Shell Script Interview Questions

Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

0 Answers  


If one dont know how to create a script then how he/she can use the QTP?

1 Answers  


How will you list only the empty lines in a file (using grep)?

4 Answers   ANZ,


Dear All, Can anybody tell me how to predefind no. of selected rows from a text file.

1 Answers   MGL,


Explain how you Automate your application using Shell scripting.

0 Answers   MAHINDRA,


What are the different types of commonly used shells on a typical linux system?

0 Answers  


c program to check whether all the directories in the path exists has read and write permission

1 Answers  


What is the way to do multilevel if-else's in shell scripting?

0 Answers  


Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

0 Answers  


Explain about echo command?

0 Answers  


What are the advantages of using shell scripts?

0 Answers  


When you login to a c shell, which script would be run first?

2 Answers  


Categories