29 Sep
2010
29 Sep
'10
2:31 p.m.
On 29/09/10 13:51, Allan McRae wrote:
[...]
just pipe it through xargs, something like `find "${pkgdir}" -type f -print0 | xargs -0 grep -m 1 -q "${pkgdir}"`
Doesn't that suffer from the same issue with potentially exceeding the maximum number of parameters?
no, the list is passed in via the pipe as opposed to actual argument, xargs then spits them out in smaller numbers
it's a lot faster than calling grep over and over. I added the `-m 1` so it stops searching after the first match.
Check out what the -q flag does... :P
duh *facepalm*
Allan