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
Why are there shells on the beach?
What is shell environment?
What can scripts do?
What are types of shells?
What is basename in shell script?
What are scripts in psychology?
Which shell is the best?
How to find all the files modified in less than 3 days and save the record in a text file?
How to get the 3rd element/column from each line from a file?
What is path variable bash?
What is sudo command?
How can you get the value of pi till a 100 decimal places?
How to get the first line from a file using just the terminal?
madhar chod unix ke 10 commands dhang se likh nahi sakta hai
What does $@ mean in shell?