4 ms·
> sed -n 's/old/new/wfile.tmp' file This saves only lines which underwent substitution, which was probably not what you wanted.
by jwilk 5y ago
> sed -n 's/old/new/wfile.tmp' file
This saves only lines which underwent substitution, which was probably not what you wanted.
- 1vuio0pswjnm7 5y agoMissing 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.tmp It also requires a space after the w command.