Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!killer!texbell!bellcore!madeleine!tr From: tr@madeleine.ctt.bellcore.com (tom reingold) Newsgroups: comp.unix.wizards Subject: Re: filename substitution question Message-ID: <15131@bellcore.bellcore.com> Date: 4 Apr 89 12:52:54 GMT References: <1627@ncar.ucar.edu> Sender: news@bellcore.bellcore.com Reply-To: tr@madeleine.UUCP (tom reingold) Distribution: usa Organization: Bellcore, Piscataway, Noo Joizy Lines: 30 On the subject of "filename substitution question", rob@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@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]