title: Awk: replace column in one file with one column from another file
body: <p>I have two files <br/> File 1: <br/> </p>
  
  <pre><code>AAAAA01 T1  0   0   0   0   C   C   G   G   G
  AAAAA02 T1  0   0   0   0   C   C   G   G   G
  AAAAA03 T1  0   0   0   0   C   C   G   G   G
  AAAAA04 T1  0   0   0   0   C   C   G   G   G
  AAAAA05 T1  0   0   0   0   C   C   G   G   G
  AAAAA06 T1  0   0   0   0   C   C   G   G   G
  AAAAA07 T1  0   0   0   0   C   C   G   G   G
  AAAAA08 T1  0   0   0   0   C   C   G   G   G
  AAAAA09 T1  0   0   0   0   C   C   G   G   G
  AAAAA10 T2  0   0   0   0   C   C   G   G   G
  AAAAA11 T2  0   0   0   0   C   C   G   G   G
  </code></pre>
  
  <p>File 2: <br/> </p>
  
  <pre><code>2   0
  2   0
  3   0
  2   0
  2   0
  3   0
  2   0
  2   0
  3   0
  3   0
  3   0
  </code></pre>
  
  <p>I have tried the following awk options.. but I only got the first row in column 6 replaced.</p>
  
  <pre><code>awk 'BEGIN { OFS = FS } FNR==NR{a[NR]=$1;next}{$6=a[FNR]}1' File2.txt File1.txt &gt; out1.txt
  
  awk 'BEGIN {OFS = FS} NR == FNR {a[FNR] = $B; next} $A = a[FNR]' B=1 A=6 File2.txt File1.txt &gt; out1.txt
  </code></pre>
  
  <p>How can I replace column 6 in File1 with column 1 in File2? </p>