How to pass arguments using shell scripts?
by Nirmala[ Edit ] 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.