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
What is web script?
Print the 10th line without using tail and head command.
What is shell application?
Explain about debugging?
What is path in shell script?
How to get the last line from a file using just the terminal?
What are the different commands available to check the disk usage?
What happens when you type ls?
Can we run shell script in windows?
Is bash a shell script?
How do I debug a shell script?
How to get the 3rd element/column from each line from a file?
How do I run a script on mac?
Can shell script run on windows?
How to set an array in linux?