filename substitution question
tom reingold
tr at madeleine.ctt.bellcore.com
Tue Apr 4 22:52:54 AEST 1989
On the subject of "filename substitution question", 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
$
$ Have I overlooked a "NOT"/"EXCEPT"/"EVERYTHING-BUT"-type special
$ character in the man pages? Or is there another simple way to do this
$ simple action in Unix (e.g., sunOS 4.0 or BSD4.3)?
While everyone's solutions have been more elegant than mine, I think
I should post the most obvious one.
ls | grep -v frog.c
(And it was quite a coincidence that David Korn mention the new feature
of ksh's regular expressions. I read the article yesterday morning and
wished we could get the new ksh. Then it arrived last night.)
Tom Reingold |INTERNET: tr at ctt.bellcore.com
Bell Communications Research |UUCP: bellcore!ctt!tr
444 Hoes La room 1E225 |PHONE: (201) 699-7058 [work],
Piscataway, NJ 08854 | (201) 287-2345 [home]
More information about the Comp.unix.wizards
mailing list