Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: filename substitution question Message-ID: <9911@smoke.BRL.MIL> Date: 23 Mar 89 16:10:29 GMT References: <1627@ncar.ucar.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 15 In article <1627@ncar.ucar.edu> 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 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.