filename substitution question
Doug Gwyn
gwyn at smoke.BRL.MIL
Fri Mar 24 02:10:29 AEST 1989
In article <1627 at ncar.ucar.edu> rob at scdpyr.ucar.edu (Robert Montgomery) writes:
>Often it would be simpler to specify what I *don't* want in filename
>substitution than what I do. For example, I would like to do something
>similar the following:
> ls {NOTfrog}.c
>and have it produce:
> bird.c fish.c
Unfortunately the shell's pattern expansion capabilities support only
a subset of the regular expression capabilities that you might expect
of a UNIX utility. However, therein lies the clue: use some other
UNIX utility. For example:
ls `echo *.c|sed 's/frog.c/ /'`
Not as convenient as what you really want, but at least the capability
is available.
More information about the Comp.unix.wizards
mailing list