write a non recursive shell script that accepts any number
of arguments and prints them in the reverse order
Answer Posted / drths
$ sh rev.sh 123 ---Script name with 1 cmd line argument
------------------------------
#! /bin/sh
abc=$1 ###123 will store in abc
pqr=`echo $pqr | rev` ### 123|rev
echo $abc
-----------------------------
o/p : 321
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
What are the two files of crontab command?
How can you get the value of pi till a 100 decimal places?
How can I send a mail with a compressed file as an attachment?
Why is shell scripting important?
How to print the first array element?
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.
c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again
What is inside a seashell?
What is bourne shell scripting?
Write a shell script to get current date, time, user name and current working directory.
What is shell environment?
State the advantages of shell scripting?
What does sh mean?
What is k shell?
What does echo $0 do?