Click to See Complete Forum and Search --> : need an example of command line in C


bsamuels
10-07-2003, 10:59 PM
I'm new to unix/linux and would like to see an example of some command line parsing that involves multiple arguments including options (preferably in C but C++ is okay) for system programming.

tecknophreak
10-07-2003, 11:10 PM
Just something that'll parse something like

command -c 10 -v -t 4

?

See attached.

micio
10-08-2003, 08:20 AM
Use getopt and getopt_long