![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| option followed by : taking next option if argument missing with getopts | gurukottur | Shell Programming and Scripting | 2 | 03-17-2008 09:46 AM |
| Help in getopts | chella | Shell Programming and Scripting | 4 | 11-01-2007 10:09 PM |
| help in getopts | problems | Shell Programming and Scripting | 1 | 05-04-2006 08:07 PM |
| getopts | yerra | Shell Programming and Scripting | 5 | 03-26-2005 07:43 AM |
| getopts | Shell Programming and Scripting | 3 | 12-05-2002 04:42 PM | |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
getopts with non-option arguments?
Hello everyone,
Is it possible to use getopts and also receive arguments without option flags? e.g. myscript arg1 arg2 -a arg3 -b arg4 If so, how do you stop getopts from exiting as soon as it detects the non-option arguments? |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Yes, but as myscript -a arg3 -b arg4 arg1 arg2. man getopts for further information
|
|
#3
|
||||
|
||||
|
Quote:
|
||||
| Google The UNIX and Linux Forums |