Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.wizards Subject: Re: ls -A Message-ID: <15015@bloom-beacon.MIT.EDU> Date: 11 Oct 89 01:59:46 GMT References: <15@minya.UUCP> <14611@bloom-beacon.MIT.EDU> <1989Oct6.201107.9465@eci386.uucp> <1989Oct7.032907.27496@rpi.edu> <1989Oct8.212100.12355@rpi.edu> <6468@ficc.uu.net> <602@buster.irby.com> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Distribution: na Organization: Massachusetts Institute of Technology Lines: 26 In article <602@buster.irby.com> rli@buster.irby.com (Buster Irby) writes: =peter@ficc.uu.net (Peter da Silva) writes: = ==grep 'pattern' .??* * = =Sorry Peter, but you just flunked your Unix Wizards Test! The ='.??*' you mentioned above will not only exclude '.' and '..' =from the glob, but will exclude all '.?' files such as ".a", ".B", =from the glob as well. If you are using the Bourne or the Korn shell, =you can try this instead: = =grep 'pattern' .[!.]* ..?* * = =The middle pattern '..?*' is only needed if you are in the habit of =creating hidden files with two or more leading dots instead of =just one, such as '..a' or '..B', otherwise it can be excluded. Actually, ".??* *" is sufficient unless you are "in the habit of creating hidden files" matching the ".?" pattern. :-) Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-4261 Home: 617-782-0710