How to add some text before another with sed? With GNU sed on linux I can make it like that:
sed -i "/\;Marker/i some text" conffile
It puts "some text" before ";Marker". But in FreeBSD I get an error:
sed: 1: "/conffile ...": extra characters at the end of l command
I need analog to use it in FreeBSD.
sed
takes theconffile
argument as commands to run, since-i
eats the actual script. – ilkkachu Jan 15 '18 at 07:37