title: Subtract values of file from 1 awk
body: <p>I have a file in which there are number less than 1 from column 3 onward. I want to subtract these number from 1. File looks like this.</p>
  
  <pre><code>q       q       0.6     0.3     0.6
  q       a       0.4     0.2     0.5
  a       q       0.3     0.2     0.3
  2       z       0.99    0.3     0.8
  </code></pre>
  
  <p>For this purpose I am using awk command.</p>
  
  <pre><code>awk -v OFS='\t' '{if(NR&lt;=1){for(i=3;i&lt;=NF;i++){$(i)=1-$(i);}}print;}' file1
  </code></pre>
  
  <p>But it giving me unexpected result.</p>
  
  <pre><code>q       q       0.4     0.7     0.4
  q       a       0.4     0.2     0.5
  a       q       0.3     0.2     0.3
  2       z       0.99    0.3     0.8
  </code></pre>
  
  <p>My expected output is this.</p>
  
  <pre><code>q       q       0.4     0.7     0.4
  q       a       0.6     0.8     0.5
  a       q       0.7     0.8     0.7
  2       z       0.11    0.7     0.2
  </code></pre>