title: awk: run time error: negative field index
body: <p>I currently have the following:</p>
  
  <pre><code>function abs() {
      echo $(($1&lt;0 ?-$1:$1));
  }
  
  echo $var1 | awk -F" " '{for (i=2;i&lt;=NF;i+=2) $i=(95-$(abs $i))*1.667}'
  </code></pre>
  
  <p>where <code>var1</code> is:</p>
  
  <pre><code>4 -38 2 -42 1 -43 10 -44 1 -45 6 -46 1 -48 1 -49    
  </code></pre>
  
  <p>When I run this, I am getting the error:</p>
  
  <pre><code>awk: run time error: negative field index $-38
  FILENAME="-" FNR=1 NR=1
  </code></pre>
  
  <p>Does this have something to do with the <code>95-$(abs $i)</code> part? I'm not sure how to fix this.</p>