When I am running sed operations on a file, for example:
sed 's/this/that/' /my/file.txt
The output is displayed on stdout.
However, when I apply the changes in place with -i
there is no stdout (no output at all to screen).
sed -i 's/this/that/' /my/file.txt
How can I still output to screen when I'm using the -i
trigger?
You can't. You've probably already noticed that if you
it just includes that line twice in /my/file.txt.
You can, of course, cheat:
or, if appropriate