[darcs-users] a bash tip for easily excluding the _darcs directory

Gerhard Siegesmund jerri at jerri.de
Wed Mar 9 11:21:31 UTC 2005


> Please consider suggesting xargs(1) since it saves many invocations of
> grep.
>     find . \( -path ./_darcs -o -path ./subrepo/_darcs \) -prune -o \
>         -print |
>     xargs grep string /dev/null
> Cheers,

Better yet use zero-ended strings if some of the files contain spaces
in the filename

     find . \( -path ./_darcs -o -path ./subrepo/_darcs \) -prune -o \
         -print0 |
     xargs -0 grep string /dev/null

-- 
cu
  --== Jerri ==--
Homepage: http://www.jerri.de/   ICQ: 54160208
Public PGP Key: http://www.jerri.de/jerris_public_key.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20050309/a085eec1/attachment.pgp 


More information about the darcs-users mailing list