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
How do we create command aliases in a shell?
Suppose you execute a command using exec, what will be the status of your current process in the shell?
Why is used in shell scripting?
Can you write a script to portray how set –x works?
Is cmd a shell?
What is the use of .sh file?
How do I read a .sh file?
What is the use of "$?" Sign in shell script?
What is the difference between scripting and coding?
What makes c shell a more preferable option than the bourne shell?
What is a boot block?
Explain about non-login shell files?
What is another name for a bash shell script that you might see?
How do I run a powershell script?
What is the difference between grep and egrep?