parameters

J

Jeremy

Guest
I am trying to learn Bash scripting. I can't get a handle on parameters... I want to determine if a string has been sent to my script. How would I start this?

Thanks for the help.
 


G

GrumpyOldMan

Guest
The bash man page has a section on parameters that should explain everything for you. Pay especial attention to the section on "Special Parameters"
 
B

bashcommando

Guest
If you are familiar to batch %1 is the same as $1 on bash
So if you run the command
Code:
./test.sh this is a test
The variables recorded would be:
Code:
$0=test.sh
$1=this
$2=is
$3=a
$4=test
 

Members online

No members online now.

Latest posts

Top