Annihilannic
MIS
Using this sed script:
On this input:
[tt]blah
yak
ugga
foo
bar[/tt]
I get this with GNU sed version 3.02 on RHEL AS2.1:
[tt]yak
blah
ugga
blah
blah[/tt]
But this with GNU sed version 4.0.7 (note the extra line) on RHEL AS3:
[tt]yak
blah
ugga
blah
blah
blah[/tt]
And this with GNU sed version 4.0.9 on SLES9:
[tt]yak
blah
ugga
blah
blah[/tt]
Has anyone encountered this? Known bug in 4.0.7 maybe? Any suggestions of how I can safely and portably code around it (or improvements to my original script for multiple searches and replacements).
Annihilannic.
Code:
/blah/{s/blah/yak/;n;}
/yak/{s/yak/blah/;n;}
/foo/{s/foo/blah/;n;}
/bar/{s/bar/blah/;n;}
On this input:
[tt]blah
yak
ugga
foo
bar[/tt]
I get this with GNU sed version 3.02 on RHEL AS2.1:
[tt]yak
blah
ugga
blah
blah[/tt]
But this with GNU sed version 4.0.7 (note the extra line) on RHEL AS3:
[tt]yak
blah
ugga
blah
blah
blah[/tt]
And this with GNU sed version 4.0.9 on SLES9:
[tt]yak
blah
ugga
blah
blah[/tt]
Has anyone encountered this? Known bug in 4.0.7 maybe? Any suggestions of how I can safely and portably code around it (or improvements to my original script for multiple searches and replacements).
Annihilannic.