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
How would you compare the strings in a shell script?
What command needs to be used to take the backup?
How do I open the shell in cmd?
What is .sh file in mac?
What are the different types of commonly used shells on a typical linux system?
Why do we write bin bash in shell scripts?
What is bash shell command?
What language is shell scripting?
I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?
What is the significance of the shebang line in shell scripting?
what is tickets $ what low,medium,high priorite pls define time also
How do I run a shell script on a mac?
What are the zombie processes?
How do I run a .sh file on mac?
How to pass an argument to a script?