Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!sri-spam!nike!ll-xn!mit-amt!mit-eddie!genrad!decvax!mcnc!rti-sel!dg_rtp!meissner From: meissner@dg_rtp.UUCP (Michael Meissner) Newsgroups: net.unix Subject: Re: Wildcard-specs Message-ID: <643@dg_rtp.UUCP> Date: Wed, 15-Oct-86 10:42:08 EDT Article-I.D.: dg_rtp.643 Posted: Wed Oct 15 10:42:08 1986 Date-Received: Thu, 16-Oct-86 22:08:59 EDT References: <4142@brl-smoke.ARPA> <191@hwee.UUCP> Reply-To: meissner@dg_rtp.UUCP (Michael Meissner) Distribution: net Organization: Data General (Languages @ Research Triangle Park, NC.) Lines: 42 In article <191@hwee.UUCP> hmc@hwee.uucp (Hugh Conner) writes: > In article <4142@brl-smoke.ARPA> VERACSD@usc-isi.arpa writes: >>Does UNIX support recursive directory-level matching? i. e. Does it allow one >>to wildcard-specify all files in a dir as well as all files in the dir's >>subdirectories? cf. the use of "**" in Symbolics' pathnames. > > We've had discussions about this at meetings of our Local user group. It is > one feature which we all agree is lacking. Unfortunately we cannot agree on a > neat, workable, solution. Suggestions include using ** as mentioned above, > making * match subdirectories as well (it does in cpio), among others. I'd > be interested to know if anyone has other solutions, and if anyone has actually > implemented it. I use Data General's AOS/VS operating system, as well as our UNIX(es), and this is an area where each system has some concepts that the other could pick up. In this case, AOS/VS has the following wildcard characters: + Match any string except a directory separator (* in UNIX). - Match any string except a directory separator that doesn't contain a period. * Match any single character except a directory separator or a a period (somewhat like in UNIX). # Match all files in subordinate directories. \ Omit a given pattern from being matched. : Directory separtor (/ in UNIX). Thus, if I wanted to match all of the C files, except those that begin with z, I would specify the pattern: cmd #:+.c\z+ Obviously if such a scheme were to be put into UNIX, the characters used would have to be changed (\ in particular). However, the # and the \ wild- cards are VERY powerful. To get the same effect in UNIX as the wildcard above, I would have to do something like: find . -type f -name "\.c$" -print | egrep -v "^z" | xargs cmd Michael Meissner, Data General ...{ decvax, ucbvax, inhp4 }!mcnc!rti-sel!dg_rtp!meissner