ls -A

Jonathan I. Kamens jik at athena.mit.edu
Wed Oct 11 11:59:46 AEST 1989


In article <602 at buster.irby.com> rli at buster.irby.com (Buster Irby) writes:
=peter at 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 at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-4261			      Home: 617-782-0710



More information about the Comp.unix.wizards mailing list