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
Write the syntax for "if" conditionals in linux?
Write a script to print the first 10 elements of fibonacci series.
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?
How to calculate the number of passed arguments?
How do I run a script on mac?
Please give me example of " at command , contrab command " how to use
Why is the use of shell script?
I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.
How do I read a .sh file?
How will you print the login names of all users on a system?
How do I run a script from command prompt?
What is the difference between grep and egrep?
What is $1 in shell scripting?
What is mac default shell?
How do you debug a script?