in reply to Getopt: vs. Getopts confusion
"Pass one argument which is a string containing
all switches that take an argument."
So you can give 'ha' to getopts() and it will understand that these options don't take arguments. To do the same for getopt() you don't mention those options...? As it was, your mentioning 'h' to getopt() meant that getopt() ate up the next 'value' ('-a') for the option.
If I read it right then getopts('oif:') is matched by using getopt('f').
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Getopt: vs. Getopts confusion
by knexus (Hermit) on Aug 31, 2003 at 00:23 UTC |