[darcs-users] Re: a bash tip for easily excluding the _darcs directory
ralph at inputplus.co.uk
Wed Mar 9 15:26:55 UTC 2005
> I think the use of "-path" here is more complicated then it needs to be,
> especially if you more than one sub-repo. This will work instead:
> find . \! -path '*_darcs*' -prune -o -print0 | xargs -0 grep string
-path at all is wrong. The above matches ./my_darcs/foo. Try
find . -name _darcs -prune -o -print
> I also wasn't clear what '/dev/null' did, so I removed it. :)
Compare these two.
(echo /etc/passwd /dev/null) | xargs grep "^$USER:"
echo /etc/passwd | xargs grep "^$USER:"
It's an idiom from before some greps have -H.
More information about the darcs-users