$ ls -l testfile*
-r--r--r-- 1 lvm lvm 50 Jun 30 08:32 testfile
$ sed 's/test/bug/g' -i~ testfile
$ diff testfile testfile~
2c2
< this is a bug
---
> this is a test
$ sed --version
sed (GNU sed) 4.4
Copyright © 2017 Free Software Foundation, Inc.
Licence GPLv3+: GNU GPL version 3 or later <
https://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.