Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
sed -i.bak 's/coy/reindeer/' hey.txt
cmp -s hey.txt hey.pristine.txt && echo "sed did not work, your files are identical."

And if we want to be more fancy to make the cmp line more generic,

Code Block
languagebash
sed -i.bak 's/coy/reindeer/' hey.txt
cmp -s $_ hey.pristine.txt && echo "sed did not work, your files are identical."

Insert Multiple Lines from File with Match

...