Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!dftsrv!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.unix.shell Subject: Re: copying files Message-ID: <28626@mimsy.umd.edu> Date: 15 Dec 90 00:47:54 GMT References: <1990Dec3.215656.8961@en.ecn.purdue.edu> <1990Dec07.201727.11006@Kesa.COM> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 37 In an article whose referent was deleted by broken news software, I wrote: >... If any such files exist, the pattern > .[^A--/-^?] >will match them. Note: ^A here represents a literal control-A, and >^? represents either a literal DEL (if you have only 7-bit shells and >files) or meta-DEL (if you have 8-bit shells and files). In article <1990Dec07.201727.11006@Kesa.COM> djc@Kesa.COM (Don Christensen) writes: >I typically use .??* because it is the easiest to type and I have rarely >(never?) come across a two character `.' file. (I have one, hence some concern. :-) ) >It seems to me, though, that the shortest way to get all `.' files >excluding `.' and `..' is with the following expression: > >ls -d .[^.]* This does not work, for several reasons: - the syntax given (left-bracket caret period right-bracket) only works in POSIXish shells. Among those excluded are all of the 4BSD and System V shells except *very* recent work. Some System V shells have an alternative syntax ([!.]). - It fails to match names like `..gotcha'. I typically use `.??*', but for reference, the construct foo `ls -f | tail +3` is also useful (provided your `ls' has a `-f'!). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris