28.3. Use Wildcards to Create Files?
% lpr [a-c]file
Now, let's say that you want to create some more files called efile, ffile, gfile, and hfile. What's wrong with typing the command line below? Try it. Instead of vi, you can use your favorite editor or the touch (Section 14.8) command:
% vi [e-h]file Doesn't make those four files % ls afile bfile cfile dfile
Stumped? Take a look at Section 1.13 about wildcard matching.
The answer: wildcards can't match names that don't exist yet. That's especially true with a command like touch ?file (Section 14.8) or touch *file -- think how many filenames those wildcards could possibly create!
Copyright © 2003 O'Reilly & Associates. All rights reserved.