Re: Using getopt to parse long options
From: Ed Morton (mortonAVOIDINGSPAM_at_lucent.com)
Date: 10/04/03
- Next message: Mark R: "Re: fields with spaces problem"
- Previous message: BR: "Re: Running Redhat and cablemodem - periodic drops that are recovered by restarting dhcpcd"
- In reply to: Vikas Agnihotri: "Using getopt to parse long options"
- Next in thread: Stephane CHAZELAS: "Re: Using getopt to parse long options"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 04 Oct 2003 07:41:14 -0500
Vikas Agnihotri wrote:
> Red Hat 9.0, getopt (enhanced) 1.1.2
>
> I am trying to use getopt to validate/parse long command line options
> and not getting anywhere.
>
> I am doing something like
>
> getopt -l a-long:,b-long: -- "--a-long a --b-long b"
>
> I get
>
> --
>
> Why do I get -- as the output?
>
> How to use this stuff? I am surprised that are so few examples of this
> to be found.
>
> Thanks
Read the thread titled "ksh'93 getopts --longoptions" posted on 26th
September and you'll find, among other things, an example of "getopts".
Yes, I know you asked about "getopt", but maybe that'll give you some ideas.
Ed.
- Next message: Mark R: "Re: fields with spaces problem"
- Previous message: BR: "Re: Running Redhat and cablemodem - periodic drops that are recovered by restarting dhcpcd"
- In reply to: Vikas Agnihotri: "Using getopt to parse long options"
- Next in thread: Stephane CHAZELAS: "Re: Using getopt to parse long options"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|