Re:Bash-oneliner: A collection of handy Bash one-liners and ...
by 1vuio0pswjnm7 on Wednesday May 04, 2022 @02:24AM
(#31257337)
Missing semicolon.
sed -n 's/old/new/;w file.tmp' file
Unlike BSD and GNU sed, it appears that Plan9 sed will append to instead of overwite file.tmpIt also requires a space after the w command.
This saves only lines which underwent substitution, which was probably not what you wanted.