$ echo 'abc 126 def' >file $ vi file -c 's/126/84' -c 'wq' $ cat file abc 84 def
I guess it is valid in vi but not sed?
$ sed 's/126/84' <file sed: -e expression #1, char 8: unterminated `s' command
Most people would use sed rather than vi to do this.
I guess it is valid in vi but not sed?