|
Posted by Toby Inkster on 11/24/53 11:46
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.
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)
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|