How to pass arguments using shell scripts?

by Nirmala 2010-01-25 15:23:28

Passing Arguments
Steps:
(*)Create file
-> Open Terminal type -> vi ss.sh
-> Type
var=$1
Display argument in two ways
1)echo $var
2)echo $1
-> Save and Quit ->:wq!
(*)Execute file with argument
-> sh ss.sh pp
(*)It will display the argument as pp.


Tagged in:

1009
like
0
dislike
0
mail
flag

You must LOGIN to add comments