sed: unsupported command e
If, when you try to use sed command to do a search and replace you get the following error:
sed: unsupported command e
Then you may have forgotten to include ‘s’ at the start of the command, e.g. this will produce the error:
sed -i '/^server\s\+\S\+$/server 192.168.1.145/' test.conf
While this will work ok (note the all important ‘s’):
sed -i 's/^server\s\+\S\+$/server 192.168.1.145/' test.conf
PS Happy New Year!