title: Bash Can not get IF to work like I want to
body: <p>I need to understand bash if expressions. Sure, I've used Google. I know that it goes something like this: </p>
  
  <pre><code>if [ expr operator expr ]
  then
  doSomeThing
  fi
  </code></pre>
  
  <p>However, I understand that Bash doesn't have a boolean data type. I want to check if the file passed as an argument ($1) exists. The way I would do this straight of my mind: </p>
  
  <pre><code>if [ -e $1 = true ] 
  then 
  echo "File exists."
  fḯ
  </code></pre>
  
  <p>Or maybe like: </p>
  
  <pre><code>if [ -e $1 ] #Assuming that this is true only if file in $1 exists. 
  </code></pre>
  
  <p>None of these work, and I'm not sure what [ ] means. -e $1 seems like a smart choice, but it is always true? There are different operators for strings and integers. And I can't use parenthesis to group together expressions. This is so confusing. </p>
  
  <p>Anyone got a few hints? The IF in bash does not work like if I've tried in any other language.  </p>