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 / 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 |
What does $@ mean bash?
Why are there shells on the beach?
Why do we use shell scripting?
What is the difference between a shell variable that is exported and the one that is not exported?
What is the way to do multilevel if-else's in shell scripting?
What is bourne shell scripting?
I want to connect to a remote server and execute some commands, how can I achieve this?
What is basename in shell script?
I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?
how to read systems current date and time
How to get the 3rd element/column from each line from a file?
How do I run a shell script on a mac?