On Thu, 15 Mar 2001, Richard Adams wrote:
> On Sun, 11 Mar 2001, Chris Rodliffe wrote:
> > I have a query - is there any cunning way (using grep or some similar
> > command) to replace a short text string in all the files in a directory
> > with another specified string? I know many things are possible with
> > Linux, just wondering if that is?
>
> I have been away on vacation for a while, after reading all of the replys to
> this mail AFAIK no one mentioned, "sed".
>
> Take a look at;
>
> http://www.cornerstonemag.com/sed/sed1line.txt
>
> It has many one line examples.
> I am sure you can combinate your wish of all files into a sed one liner.
>
In fact one person did give a 'sed' example (can't remember who, now).
I eventually did it using perl, but obviously there are many ways to do things
in Linux. I'll take a look at the URL you quoted and file it for future
reference, anyway.
Thanks
Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs