![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [: too many arguments | tainted2real | Shell Programming and Scripting | 4 | 08-26-2008 05:25 AM |
| getopts with non-option arguments? | kdelok | Shell Programming and Scripting | 2 | 07-26-2008 11:44 PM |
| awk arguments | karthikn7974 | Shell Programming and Scripting | 6 | 05-07-2008 01:34 AM |
| option followed by : taking next option if argument missing with getopts | gurukottur | Shell Programming and Scripting | 2 | 03-17-2008 12:46 PM |
| several arguments together | homefp | Shell Programming and Scripting | 8 | 07-04-2002 04:44 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Getting 2 or more arguments from an option
Hi. Is there a way I can get 2 or more arguments from an option?
Something like: Usage: myscript -a arg1 arg2 Then a simple printing of arg1 and arg2 will do. I just need it as a template. The script should also work if no arguments for option "a" is specified. so running "myscript -a" will still do something. I've tried using the getopts command but I can only seem to handle arg1. Thanks in advance. ![]() Last edited by esia; 02-24-2009 at 11:57 PM.. |
![]() |
| Bookmarks |
| Tags |
| parsing options |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|