title: Bash: Replace "nothing" with zero
body: <p>I get as output "nothing", and I need to replace that with "0". For instance, my file has <code>duse</code> as follows:</p>
  
  <pre><code>duse     1
  </code></pre>
  
  <p>and <code>awk</code> prints <code>1</code> with:</p>
  
  <pre><code>surange &lt; survey.su | grep duse | awk '{ print $2 }'
  </code></pre>
  
  <p>Because there is no <code>delrt</code>, the code gives no result for that variable:</p>
  
  <pre><code>surange &lt; survey.su | grep delrt | awk '{ print $2 }'
  </code></pre>
  
  <p>because <code>delrt</code> does not exist.</p>
  
  <p>Just to add that redirecting the output to a file:</p>
  
  <pre><code>surange &lt; survey.su | grep delrt | awk '{ print $2 }' &gt; value
  </code></pre>
  
  <p>says <code>empty</code> after using <code>file</code>:</p>
  
  <pre><code>$ file value 
  value: empty
  </code></pre>
  
  <p>Any idea? thanks for any pointers,</p>