|
SUMMARY: Command Line parsing: msg#00137os.solaris.managers.summaries
Thanks to Sanjiv Bhatia for his VERY quick response! (10 minute wait, that's all) To parse through all the command-line arguments we can use the "shift" command. It will shift positional arguments ($2 become $1). It works with ksh and sh like in the following script > #!/bin/ksh > > for i in $* > do > echo $i > shift > done Also there is another solution that I totally forgot about: for ARG in $* do echo $ARG done |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | SUMMARY - 2nd: growing a ufs drive: 00137, Jeff Kennedy |
|---|---|
| Next by Date: | Summary: Script to check for memory config on E420R/Ultra 80: 00137, Tony Magtalas |
| Previous by Thread: | SUMMARY - 2nd: growing a ufs drivei: 00137, Jeff Kennedy |
| Next by Thread: | Summary: Script to check for memory config on E420R/Ultra 80: 00137, Tony Magtalas |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |