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

What is a program shell?

1053


‎What is a shell? · ‎Types of shell · ‎what is shell scripting?

985


What is the difference between grep and egrep?

1148


What is ms powershell?

1029


Explain about shebang?

1043


What happens on a system call?

1025


How do you know which shell I am using?

1054


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

2571


What is sed in shell script?

1060


How do I open a jshell in cmd?

1255


How do we delete all blank lines in a file?

1118


How do I save a powershell script?

1159


What are "c" and "b" permission fields of a file?

1029


Is shell and terminal the same?

1069


How to check if a directory exists?

1202