[cs631apue] Multiple letter command options

Jan Schaumann jschauma at stevens.edu
Sat Oct 1 12:39:52 EDT 2016


mseaton <mseaton at stevens.edu> wrote:

> Are re responsinble for handling any multiple character command options 
> like ls -al, -ltr, etc? Or multiple operands containing command options 
> like say
> ls -l -a?

Yes, both are valid methods of passing multiple flags.

Use getopt(3) to parse command-line arguments; it will do the right
thing.

-Jan


More information about the cs631apue mailing list