title: write a shell script with a loop
body: <p>i have an awk command as below :</p>
  
  <pre><code>awk 'FNR==NR{a[$1$2]=$3;next} ($1$2 in a) {print$1,$2,a[$1$2],$3}' ""each line of file 1""  &gt;./awkfile/12as_132l.txt
  </code></pre>
  
  <p>and f1.txt content is :</p>
  
  <pre><code>1sas.txt 12ds.txt 
  13sa.txt 21sa.txt
  </code></pre>
  
  <p>i want that my script read each line of fil1.txt and put the contents in this awk command...instead of """each line of file1"".. and execute the command like below:</p>
  
  <pre><code>    awk 'FNR==NR{a[$1$2]=$3;next} ($1$2 in a) {print$1,$2,a[$1$2],$3}'  1sas.txt 12ds.txt  &gt;./awkfile/12as_132l.txt
  
  
  
    awk 'FNR==NR{a[$1$2]=$3;next} ($1$2 in a) {print$1,$2,a[$1$2],$3}' 13sa.txt 21sa.txt  &gt;./awkfile/12as_132l.txt
  </code></pre>
  
  <p>i need a loop but the problem is that's a little strange for me .</p>