title: Shell Script-Checking if file exists, creating one, export terminal as log
body: <p>I've just started learning bash yesterday and I need a little help. I need to make a script that will check if a file exists on co-workers computers and, if it doesn't the, script will make one. I have a general idea for that. The more important help I need is recording or logging the script to an output.txt or something of the sorts. I've seen the script command but it seems to be manual. I need it to record every interaction from the start to end and then export it and exit. </p>
  
  <p>I could probably test if that log exists and then append whatever the script needs to check. I assume to start I could do file="./file" (example) and then do </p>
  
  <pre><code>    if [ -e "$file" ]; then whatever. 
  </code></pre>
  
  <p>What I plan to do is make a script that maybe checks if a firewall is on or if the co-workers have some file and then export the result(s) to some dir (mkdir). Pure examples. I really just need assistance on the exporting of the whole terminal input and output. Thanks. </p>