[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: stupid script tricks - slightly OT





On Mon, Apr 29, 2002 at 12:05:33PM -0400, jeff wrote:
> Allan Wind wrote:
> 
> > cd /usr/local/share/icons; find / \( -name \*.gif -o name \*.jpeg  \
                                                        ^^
> > -o -name \*.jpg -o -name \*.tif -o -name \*.tiff \) -a -type f |   \
> >  xargs -i ln -s \{\} .

In this case, cut'n'paste was your enemy :-(
You left off the hyphen that introduces this test (see
indication above).


Also, personally I like to force the period to be a period and
not a wildcard for "any character", just in case there was a file
named myfilewhichisjpg that I didn't want to match.  I also
usually put the -print explicitly.

  find / \( -name \*\.gif -o -name \*\.jpeg -o -name \*\.jpg   \
  -o -name \*\.tiff -o -name \*\.tiff \) -a -type f -print |   \
  xargs -i ln -s \{\} .

-- 
bjb@achilles.net
Welcome to the GNU age!   http://www.gnu.org


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: