title: Find minimum value using awk
body: <p>I am trying to find the minimum value from a file.</p>
  
  <pre><code>input.txt
  1
  2
  4
  5
  6
  4
  </code></pre>
  
  <p>This is the code that I am using:</p>
  
  <pre><code>awk '{sum += $1; min = min &lt; $1 ? min : $1} !(FNR%6){print min;sum=min = ""}' input.txt
  </code></pre>
  
  <p>But it is not working. Can anybody see the error in my code?</p>