title: Removing last blank line
body: <p>There is a para break at the end of my .csv file. I tried to remove the blank line that is at the end of the file using the following command.</p>
  
  <pre><code>sed -i '/^$/d' combined.csv
  </code></pre>
  
  <p>But it does not work and a blank line is still there. I can remove the last line using the following command.</p>
  
  <pre><code>sed -i '$d' combined.csv
  </code></pre>
  
  <p>But is it possible to check if the last line is really empty before removing it?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I am using the following command to check if each line start with a number.</p>
  
  <pre><code>sed -i '1s/^[^0-9]*//' combined.csv
  </code></pre>
  
  <p>This checks only for the first line and not the rest of the lines. How do I make it check all the lines in the file? This might solve my problem.</p>