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

Re: stupid script tricks - slightly OT



on Tue, Apr 30, 2002, Brenda J. Butler (bjb@achilles.net) wrote:
> 
> 
> 
> 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.

Experience has taught me that "-print0" (find) and -0 (xargs) can be
useful as well.

Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   Moderator, Free Software Law Discussion mailing list:
     http://lists.alt.org/mailman/listinfo/fsl-discuss/

Attachment: pgpU1zANbCmcf.pgp
Description: PGP signature


Reply to: