title: Check if sed command made a change or not
body: <p>I'm writing now bash script for Ubuntu.
  I have a lot of <code>sed</code> statements that replace and change some text in files.</p>
  
  <p>My question is: How can i know if the change was performed or not.</p>
  
  <p>For example, I have this statement:</p>
  
  <pre><code>sed -i "s;#net.ipv4.ip_forward=1;net.ipv4.ip_forward=1;" /etc/sysctl.conf
  </code></pre>
  
  <p>Was a change to the file actually made?</p>