[OCLUG-devel] C argum

John de la Garza john at jjdev.com
Sat Apr 26 12:25:02 PDT 2014


On Sat, Apr 26, 2014 at 03:04:11PM -0400, Joshua Robinson wrote:
> Greetings OcLugers,
> 
> In C need to pass on the command line:
> 
> MyProjName  -s user at host and -u user_name
> 
> How do I do that (many year since I did C), little code would be nice ?

check out getopt

you can type "man 3 getopt" at a shell prompt

there is sample code in man page 


More information about the OCLUG-devel mailing list