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"

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you compare the strings in a shell script?

944


What command needs to be used to take the backup?

957


How do I open the shell in cmd?

1075


What is .sh file in mac?

990


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

1031


Why do we write bin bash in shell scripts?

977


What is bash shell command?

979


What language is shell scripting?

988


I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?

1286


What is the significance of the shebang line in shell scripting?

1068


what is tickets $ what low,medium,high priorite pls define time also

2113


How do I run a shell script on a mac?

1086


What are the zombie processes?

935


How do I run a .sh file on mac?

1111


How to pass an argument to a script?

1122