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...

How do you read arguments in a shell program - $1, $2 ..?

Answer Posted / madhavi

to read command line argments we hav to use echo $1
$2........whre $0-gives name of program,$#-gives number of
arguments passed and $* gives all the arguments.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does $@ mean in shell?

1033


What is the first line in every perl script called?

1040


What is the syntax of while loop in shell scripting?

1041


What is the use of .sh file?

1111


How will you pass and access arguments to a script in linux?

1148


What is gui scripting?

1096


How to calculate the number of passed arguments?

1081


How to print pid of the current shell?

989


write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.

2776


Print the 10th line without using tail and head command.

2172


How to debug the problems encountered in the shell script/program?

1140


Explain about "s" permission bit in a file?

1054


Explain about sourcing commands?

1087


What is sh in shell script?

1023


How can you get the value of pi till a 100 decimal places?

966