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

Jamie Webb j at jmawebb.cjb.net
Wed Mar 9 14:42:16 UTC 2005

On Wed, Mar 09, 2005 at 02:07:09PM +0000, Mark Stosberg wrote:
> find . \! -path '*_darcs*' -prune -o -print0 | xargs -0 grep string 

I think that should be:

find . -path '*/_darcs/*' -prune -o -print0 | xargs -0 grep string

> I also wasn't clear what '/dev/null' did, so I removed it. :)

It prevents grep reading from stdin if find doesn't match anything.
This should never happen though because find will always match at
least '.'.

> > People may not have GNU find and GNU xargs.  Have the NUL versions
> > reached POSIX yet?
> These "NUL" options have reached FreeBSD at least, which means they've
> reach Mac OS X, too.

They aren't in Solaris, but then if anyone is developing on Solaris
and hasn't installed the GNU tools to replace the shoddy Solaris ones,
they deserve all the pain they get...

-- Jamie Webb

More information about the darcs-users mailing list