__/ [ Toby Inkster ] on Sunday 30 April 2006 12:14 \__
> Roy Schestowitz wrote:
>> That 'script', by the way, is a derivative of something that /you/ once
>> wrote in an answer to my question.
> Really? I can't imagine I would have written something as fancy as that as
> a shell script. For anything that involves loops and logic, I tend to
> immediately switch to Perl.
With respect, there was nothing overly sophisticated in your previous
suggestion. I just never knew anything about sed. Then you provided me with
a useful, extensible template/example. I needed such a tool for editing
files /en masse/.
http://schestowitz.com/Software/Search_and_Replace/ (it's not "software", but
it didn't fit anywhere else)
> You might want to look at replacing this:
> sed 'script' file >file.xxxxx
> mv file.xxxxx file
> with this:
> sed -i 'script' file
> From "man sed":
> -i[SUFFIX], --in-place[=SUFFIX]
> edit files in place (makes backup if extension supplied)
Thanks. To be honest, my filthy beast *grin* is doing its work reliably
enough and completes the task within a few seconds. I fear change that
involves subsequent testing, but will keep your kind advice close to hand.
Roy S. Schestowitz | "Have you compiled your kernel today?"
http://Schestowitz.com | SuSE Linux ¦ PGP-Key: 0x74572E8E
7:00pm up 3 days 1:57, 13 users, load average: 0.49, 0.58, 0.44
http://iuron.com - help build a non-profit search engine