title: While loop is not stopping and reading last line (bash)
body: <p>code snippet is below i'm simply trying to curl url details but loops is acting weirdly it's not ending the loop properly if more than 2 urls has been provided to text file &amp; if one url is provided than not able to read that with out this line <code>|| [ -n url ]</code>.</p>
  
  <pre><code>while IFS= read -r url || [ -n url ] ; do
      sh file.sh $url
  done &lt; "file.txt"
  </code></pre>