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 different types of shell scripting?
What is the lifespan of a variable inside a shell script?
What is sed in shell script?
What command needs to be used to take the backup?
What are the various stages of a linux process it passes through?
Explain about return code?
Explain about shebang?
What are the types of script?
Is shell scripting useful?
What is shell terminal?
What is meant by dos operating system?
How important is shell scripting?
How do I set bash as default shell mac?
Is scripting and coding the same thing?
What is a program shell?