title: Find out if file has changed
body: <p>I want to find out if a file has been modified since the last time my shell script was started, maybe by creating a boolean or something...
  Maybe it would be possible to save the last time the script was run in a text file and when the script is started the next time it should read this file and then it should find out what file have been changed so that I can check if a file has changed using something like:</p>
  
  <pre><code>for file in *
  do
      #Somecode here
      if [ $filehaschanged != "0" ]; then
      echo "Foobar" &gt; file.txt
      fi
      #Somecode here
  done
  </code></pre>
  
  <p>Maybe it would be possible to do this with <code>find</code>...any ideas?</p>