[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: |
Gary Oberbrunner |
Subject: |
Re: [h-e-w] xargs fails with "grep: Invalid argument" |
Date: |
Thu, 29 Jul 2010 09:54:39 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20081218 Lightning/1.0pre Shredder/3.0b2pre Mnenhy/0.7.6.0 |
On 7/29/2010 9:50 AM, egarrulo wrote:
> 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.
-0 is fine, it means expect null-terminated filenames on input, which is
what find puts out with -print0. The xargs man page is just being dense.
I'd get emacs out of the picture and just make the above cmd line work
in a shell, and then once that's working you should have a handle on
what to put in your .emacs.
--
-- Gary