[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [h-e-w] xargs fails with "grep: Invalid argument"
From: |
egarrulo |
Subject: |
Re: [h-e-w] xargs fails with "grep: Invalid argument" |
Date: |
Thu, 29 Jul 2010 13:50:14 +0000 |
Thanks for answering. I've deleted the "-e" after "xargs" (because I
think the second one is passed to grep), but that didn't fix the
issue:
find . "(" -path "*/SCCS" -o -path "*/RCS" -o -path "*/CVS" -o -path
"*/MCVS" -o -path "*/.svn" -o -path "*/.git" -o -path "*/.hg" -o -path
"*/.bzr" -o -path "*/_MTN" -o -path "*/_darcs" -o -path "*/{arch}" ")"
-prune -o -type f "(" -iname "*.el" ")" -print0 | xargs -0 grep -i -n
-e "redefined"
xargs: grep: Invalid argument
xargs' help for `-0' says it should look like `-0prtx', but I don'
understand what that means.
However, now I'm checking out `ack' (see betterthangrep.com) + ack.el
(see http://www.shellarchive.co.uk/content/emacs.html), which seems to
eat those big directories (only thing worse than grep is that output
is not incremental).
2010/7/29 Gary Oberbrunner <address@hidden>:
> On 7/29/2010 8:59 AM, egarrulo wrote:
>
>> find . "(" -path "*/SCCS" -o -path "*/RCS" -o -path "*/CVS" -o -path
>> "*/MCVS" -o -path "*/.svn" -o -path "*/.git" -o -path "*/.hg" -o -path
>> "*/.bzr" -o -path "*/_MTN" -o -path "*/_darcs" -o -path "*/{arch}" ")"
>> -prune -o -type f "(" -iname "*.el" ")" -print0 | xargs -0 -e grep
>> -nH -e "REDEFINED"
>> xargs: grep: Invalid argument
>
> I don't think you should be passing "-e" to xargs like that. -e is the
> eof-char arg for xargs.
>
> -- Gary
>