Hi Lawson!

On Sat, 04 Jan 2003, [EMAIL PROTECTED] wrote:

> This also seems to work:
> 
> find -name 'Makefile'|xargs -i perl -pi -e 's/-Werror//g' {}

First off thank you very much! It worked fine.
But now I still want to understand it ;)

What I dont understand is the:

1) "-i perl" option
        man page says:
        --replace[=replace-str], -i[replace-str]
              Replace occurences of replace-str  in  the  initial
              arguments  with  names  read  from  standard input.
              Also, unquoted blanks do not  terminate  arguments.
              If  replace-str  is  omitted,  it  defaults to "{}"
              (like for `find -exec').  Implies -x and -l 1.

   As I understand this it calls perl and executes the regexp on a file.
        The explanation of the -i option in man page of xargs and that it
        calls perl doesnt fit together in my understanding.

2) "-pi" option
        "-p" runs the "program" first through the C preprocessor, right? But
        what for?
        
        "-i" means that the file is edited in-place? What does that mean?

3) What is the {} for?


Thank you very much,
Axel
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to