In GNU sed, the in-place options supports the following format:
$ sed -i script file # no backup file produced
$ sed --in-place script file # no backup file produced
$ sed -i[SUFFIX] script file # backup file of form: file[SUFFIX]
$ sed --in-place=[SUFFIX] script file # backup file of form: file[SUFFIX]
The current argument parsing function, however, consumes the successive argument for in-place option without checking the form. This is also mentioned in #229.
$ cat temp
quick brown fox
$ ./target/release/sed -i 's/fox/vox/' temp
sed: <script argument 1>:1:1: error: undefined label `emp'
$ sed -i 's/fox/vox/' temp
$ cat temp
quick brown vox
$ sed -i.bak 's/vox/fox/' temp
$ ls -1
temp
temp.bak
In GNU sed, the in-place options supports the following format:
The current argument parsing function, however, consumes the successive argument for in-place option without checking the form. This is also mentioned in #229.