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
Is shell scripting a language?
Give some situations where typing error can destroy a program?
What is the difference between scripting and coding?
How do you debug a script?
What does $1 mean in bash?
What is the fastest scripting language?
How many fields are present in a crontab file and what does each field specify?
What will happen to my current process when I execute a command using exec?
Tell something about the super block in shell scripting?
Is powershell a language?
What is the significance of $#?
Explain about sourcing commands?
Why do we use shell scripting?
What is the crontab?
Determine the output of the following command: name=shubham && echo ‘my name is $name’.