title: Using the && operator in an if statement
body: <p>I have three variables:</p>
  
  <pre><code>VAR1="file1"
  VAR2="file2"
  VAR3="file3"
  </code></pre>
  
  <p>How to use and (<code>&amp;&amp;</code>) operator in if statement like this:</p>
  
  <pre><code>if [ -f $VAR1 &amp;&amp; -f $VAR2 &amp;&amp; -f $VAR3 ]
     then ...
  fi
  </code></pre>
  
  <p>When I write this code it gives error. What is the right way?</p>