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

What are the different commands available to check the disk usage?

0 Answers  


What is bash used for?

0 Answers  


what are bootlevel in linux?which level is booting by default.

5 Answers   Symphony,


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

1 Answers  


How can I send a mail with a compressed file as an attachment?

0 Answers  


how to delete all the files with extension .dat rom a directory tree from root to third level in a single unix command?

4 Answers  


What language is bash?

0 Answers  


write a shell script to identify the given string is palindrome or not?

17 Answers   CTS, HP, IBM, InfoEst, Wipro,


What is the use of echo in shell script?

0 Answers  


shell script for reverse the string

0 Answers  


What is the need of including script interpreter in your shell script?

2 Answers  


Explain about debugging?

0 Answers  


Categories