Re: [OxLUG] Unix command line options/arguments

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Malcolm Beattie
Date:  
To: Oxfordshire Linux User Group Discussion List
Subject: Re: [OxLUG] Unix command line options/arguments
Sad Clouds writes:
> Hi, I've looked at various ways of parsing command line options, things
> like getopt and getsubopt, and then realised that if you have a complex
> program that might require a config file, then you end up doing the
> same work twice (openssl is a good example):
>
> 1. Write code to parse config file.
> 2. Write code to parse command line options with getop, etc.

[...]
> Does anyone know if someone has already developed a library that does
> more or less what I have described above (I couldn't find any)? Or
> maybe someone can see a flaw in my methodology??


If you don't mind C++,
    http://www.boost.org/doc/html/program_options.html


--Malcolm