getopt Parses Option as Argument
Trouble_at_Mill
Date: 11/13/03
- Next message: Axinar: "Knoppix -- this is the bomb, people"
- Previous message: P.T. Breuer: "Re: CVS and Shell Accounts"
- Next in thread: Joost Kremers: "Re: getopt Parses Option as Argument"
- Reply: Joost Kremers: "Re: getopt Parses Option as Argument"
- Reply: Bartosz Oudekerk: "Re: getopt Parses Option as Argument"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 12 Nov 2003 20:21:13 -0800
Hi,
I'm trying to use getopt to parse the command line arguments.
However, I can't seem to get it to work 'as designed'.
My *optstring is set to "d:s:C:h". If I call the program with the
following arguments:
-d 0 -s -C01
Note, the missing argument for -s. Then, the -C01 is taken as the
argument for -s, whereas the documentation implies that I should get
notification of the missing item.
If I try:
-d 0 -C01 -s
Then I get, correctly, the message "option requires an argument".
How can I get the former example to 'behave'.
Cheers,
Eddie
- Next message: Axinar: "Knoppix -- this is the bomb, people"
- Previous message: P.T. Breuer: "Re: CVS and Shell Accounts"
- Next in thread: Joost Kremers: "Re: getopt Parses Option as Argument"
- Reply: Joost Kremers: "Re: getopt Parses Option as Argument"
- Reply: Bartosz Oudekerk: "Re: getopt Parses Option as Argument"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|