title: script not reading last line of a file
body: <p>i have a file created in windows using notepad:</p>
  
  <pre><code>    26453215432460
      23543265235421
  
      38654365876325
  
  
      12354152435243
  </code></pre>
  
  <p>I have a script which will read every line, and create a command like below in other file for every line and will not consider blank lines:</p>
  
  <pre><code>    CRE:EQU,264532154324600,432460,1;
  </code></pre>
  
  <p>Now if I save my input file after hitting enter after the last line of number <code>12354152435243</code>, then the output file consists the command above corresponding to all numbers(including the last <code>12354152435243</code>:</p>
  
  <pre><code>    CRE:EQU,264532154324600,432460,1;
      CRE:EQU,235432652354210,235421,1;
      CRE:EQU,386543658763250,876325,1;
      CRE:EQU,123541524352430,435243,1;
  </code></pre>
  
  <p>but if I save the file, without hitting enter after the last number is keyed in i.e after this <code>12354152435243</code>, then after the script executes, I don't see the output file have the command for the last number:</p>
  
  <pre><code>    CRE:EQU,264532154324600,432460,1;
      CRE:EQU,235432652354210,235421,1;
      CRE:EQU,386543658763250,876325,1;
  </code></pre>
  
  <p>Can somebody explain the error in the code:</p>
  
  <pre><code>    while read LINE
      do
      [ -z "$LINE" ] &amp;&amp; continue
      IMEI=`echo $LINE | sed 's/ //g' | sed -e 's/[^ -~]//g'`
      END_SERIAL=`echo $IMEI | cut -c9- | sed 's/ //g' | sed -e 's/[^ -~]//g'`
      echo "CRE:EQU,${IMEI}0,${END_SERIAL},${list},,${TODAY};" &gt;&gt; /apps/ins/list.out
      done &lt; "${FILE_NAME}"
  </code></pre>
  
  <p>kindly help</p>