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 |
How do I open a jshell in cmd?
I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?
What is the syntax of "grep" command?
What is the difference between bash and shell?
I want to read all input to the command from file1 direct all output to file2 and error to file 3, how can I achieve this?
What are different types of shell?
How do you schedule a command to run at 4:00 every morning?
How do you print the output the same string which is typed in command line. how do you write the shell script or command for this. if i entered "Hello" in command line, it should print 'Hello', if i say "Hello Welcome", i should get the "Hello Welcome" as output.?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
How do I run a shell script on a mac?
What is sed in shell script?
What is bash shell command?