Hello.
Al of a sudden sed began to act differently on FreeBSD 11
On FreeBSD 11.0 following script (<------> - tab character)
SEARCHED_LINE
#!/bin/sh
sed -E -i '.orig' \
<------>-e '/^SEARCHED_LINE/ a\
<------>line1\
line2\
<------>\<------>line3' \
file
performs this output:
While on FreeBSD 10.3 and previuos versions it performed this:
Does somebody know why FreeBSD devs have changed pretty sane and convenient sed's behaviour to gsed's one?
My scripts looked very neat and structured with previous BSD sed.
Do I have to rewrite all my scripts now?
Regards
Al of a sudden sed began to act differently on FreeBSD 11
On FreeBSD 11.0 following script (<------> - tab character)
# cat file
SEARCHED_LINE
#cat testscript.sed
#!/bin/sh
sed -E -i '.orig' \
<------>-e '/^SEARCHED_LINE/ a\
<------>line1\
line2\
<------>\<------>line3' \
file
performs this output:
Code:
SEARCHED_LINE
<------>line1
line2
<------><------>line3
While on FreeBSD 10.3 and previuos versions it performed this:
Code:
line1
line2
<------>line3
Does somebody know why FreeBSD devs have changed pretty sane and convenient sed's behaviour to gsed's one?
My scripts looked very neat and structured with previous BSD sed.
Do I have to rewrite all my scripts now?
Regards