If a token contains wildcard characters * or ?, the token is treated as a filename. The wildcard characters in such a token indicate to the shell that the filename must be expanded. For example the command:
% ls *.c
may be expanded to ls ex1.c ex2.c ex3.c if there are three matching files 'ex1.c ex2.c ex3.c' in the current directory.
You may implement this feature using the C function glob.
If a token contains wildcard characters
*
or?
, the token is treated as a filename. The wildcard characters in such a token indicate to the shell that the filename must be expanded. For example the command:% ls *.c
may be expanded to ls
ex1.c ex2.c ex3.c
if there are three matching files 'ex1.c ex2.c ex3.c' in the current directory.You may implement this feature using the C function
glob
.