Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Is shell scripting a language?

1020


Give some situations where typing error can destroy a program?

1234


What is the difference between scripting and coding?

1021


How do you debug a script?

1059


What does $1 mean in bash?

1073


What is the fastest scripting language?

986


How many fields are present in a crontab file and what does each field specify?

1101


What will happen to my current process when I execute a command using exec?

1033


Tell something about the super block in shell scripting?

1018


Is powershell a language?

1030


What is the significance of $#?

1082


Explain about sourcing commands?

1075


Why do we use shell scripting?

978


What is the crontab?

1060


Determine the output of the following command: name=shubham && echo ‘my name is $name’.

975