title: writing bash script to change text and write to a log
body: <p>I have written a very simple bash script to help me migrate from dev to staging.  What it does is it deletes all files in staging, copies the files over from dev to stage.</p>
  
  <p>However, the config.inc.php file needs to have the first instance of "dev" to be changed to "stage", and no other instance changed.</p>
  
  <p>Second, everytime I run it (I run the script from the dev directory), i'd like it to write a log back in the dev directory which will append the date/time stamp that I ran the staging bash script into this log.</p>
  
  <p>Thanks.</p>