title: How to exit a shell script if targeted file doesn't exist?
body: <p>Given the script below, I would like to avoid the execution of the pipeline if a file does not exist.</p>
  <p>How may I exit the script straight away if the text file is not found?</p>
  <pre class="lang-bash prettyprint-override"><code>ls */*.txt | grep ab1 | awk '{print $1, $1}' | sed &quot;s/\&quot;/\&quot;\&quot;/g&quot; | xargs -L1 mv
  </code></pre>