15.4 What if a Wildcard Doesn't Match?I ran into a strange situation the other day. I was compiling a program that was core dumping ( 52.9 ) . At some point, I decided to delete the object files and the core file, and start over, so I gave the command:
%
It works as expected most of the time,
except when
no object files
exist. (I don't remember why I did this, but it was probably by using
It turns out, for C shell users, that if none of the wildcards can be
expanded, you get a On the other hand, if the Bourne shell can't match a wildcard, it just passes the unmatched wildcard and other filenames:
*.o core
to the command (in this case, to
rm
) and lets the command
decide what to do with it.
So, with Bourne shell, what happens will depend on what your command
does when it sees the literal characters You can make csh act a lot like sh by using:
set nonomatch - , |
|