[cs631apue] (no subject)

Jan Schaumann jschauma at stevens.edu
Sun Oct 2 15:48:21 EDT 2016

mseaton <mseaton at stevens.edu> wrote:
> Do we have to support the ls -- option or commands like ls *.c or *.doc 
> which would display all files with extensions .c and .doc respectively?

Yes, but that's no work for you.

Wildcard expansion is a feature of the shell, not the program that's

That is, if you run

prog *.c

the shell expands '*.c' to all the files that end in '.c' and your
program's argv will be e.g. ['prog', 'file1.c', 'foo.c', 'bar.c'].

Supporting '--' to signify the end of command-line options is provided
to you by getopt(3).


More information about the cs631apue mailing list