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

Why is a script important?

0 Answers  


What is wc in shell script?

0 Answers  


shell script for reverse the string

0 Answers  


What does the sh command do?

0 Answers  


What is the use of "test" command?

2 Answers  


What is echo in shell?

0 Answers  


How to redirect both standard output and standard error to the same location?

0 Answers  


Can we run shell script in windows?

0 Answers  


How to print all the arguments provided to the script?

0 Answers  


How to enable the shell to know what program should be run to interpret the script?

3 Answers  


Is shell script a programming language?

0 Answers  


How to customise the existing shell?

1 Answers  


Categories