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 is meant by dos operating system?

570


Why is it called a shell?

499


How do you create a shortcut in linux?

589


shell script for reverse the string

914


Where are cowrie shells found?

570






What can you do with powershell?

599


Can shell script run on windows?

559


Explain about echo command?

620


What does $@ mean in shell?

588


Is powershell a language?

556


What are types of shells?

539


What is echo in shell?

630


Is shell scripting a programming language?

572


How do you debug a script?

559


What is the first line in every perl script called?

547