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

How will you schedule a job that will run every month last day?(some months have 30 days,some 31 days,28,29 days)

1 Answers   NTT Data, TCS,


How to print the first array element?

0 Answers  


How do I run a powershell script?

0 Answers  


What makes c shell a more preferable option than the bourne shell?

0 Answers  


How to get script name inside a script?

0 Answers  


How to find all the files modified in less than 3 days and save the record in a text file?

0 Answers  


why did you apply to shell

3 Answers   Shell,


What is the syntax of "expr" command?

2 Answers  


Can we run shell script in windows?

0 Answers  


What does egrep mean?

0 Answers  


What is an sh file?

0 Answers  


wats the deinitions for shell utility and filter?

0 Answers  


Categories