[CentOS] script

MHR mhullrich at gmail.com
Tue Sep 30 23:07:46 UTC 2008

On Tue, Sep 30, 2008 at 3:08 PM, Chris Geldenhuis
<chris.gelden at iafrica.com> wrote:
> How about:
> find <startdir> -exec sed "s/" \{\} \;

First, the '\' characters are unnecessary and confusing, except the
one that precedes the semi-colon.

Second, that won't work.  Sed does not perform on files in place - its
output is sent to stdout unless it is redirected, and you can't
redirect it back to the original file.  To do something this way,
you'd need a script that replaced the input file and used 'sed' to
generate the new one (and then the script would have to rename it).


More information about the CentOS mailing list