title: How do i compare if my variable holds a newline character in shell Script
body: <p>I have a script in which I have a line which does put the third line fetched in my variable like this:</p>
  
  <pre><code>variable=`sed -n '3 p' /home/nmsadm/abc.txt`
  </code></pre>
  
  <p>So <code>variable</code> holds this value Which is in third line of abc.txt. In my case it 
  will be a one word line or an empty/blank line.</p>
  
  <p>How can I compare the variable in a shell script to know if it's an empty/blank line? 
  <code>echo $variable</code> fetched me an empty line.</p>
  
  <p>What is the comparison i need to here so that
  I am assured it's an empty line? Something like this:</p>
  
  <pre><code>if [ "$variable" = "comparison" ]; then
  </code></pre>