title: bash which OR operator to use - pipe v double pipe
body: <p>When I'm looking at bash script code, I sometimes see <code>|</code> and sometimes see <code>||</code>, but I don't know which is preferable.</p>
  
  <p>I'm trying to do something like ..</p>
  
  <pre><code>set -e;
  
  ret=0 &amp;&amp; { which ansible || ret=$?; }
  
  if [[ ${ret} -ne 0 ]]; then
      # install ansible here
  fi
  </code></pre>
  
  <p>Please advise which OR operator is preferred in this scenario.</p>