title: Search array index with double quotes string using awk
body: <p>File1:</p>
  
  <pre><code>"1"|data|er
  
  "2"|text|rq
  
  ""|test2|req
  
  "3"|test4|teq
  </code></pre>
  
  <p>File2:</p>
  
  <pre><code>1
  
  2
  
  3
  </code></pre>
  
  <p>Expected Output should be (file3.txt)</p>
  
  <pre><code>"1"|data|er
  
  "2"|text|rq
  
  "3"|test4|teq
  </code></pre>
  
  <pre><code>awk -F''$Delimeter'' '{print $1}' file1.txt | awk '{gsub(/"/, "", $1); print $1}' | awk  'NF &amp;&amp; !seen[$1]++' | sort -n &gt; file2.txt
  </code></pre>
  
  <p>I am able to extract the ids 1,2,3 from file1 and removed the double quotes and written into the file2 but i need to search these 1,2,3 ids in my file1.txt("1","2","3"), problem is search not recognizing due to dobule qoutes in the file </p>
  
  <pre><code>awk 'BEGIN {FS=OFS="|"} NR==FNR{a[$1]; next} \"$1\" in a' file2.txt file1.txt &gt; file3.txt
  </code></pre>