I have read another post about this issue and am wondering how to adapt it
to my own, much simpler, issue.
I have a file of user IDs like so:
333333
321321
546465
...etc
I need to take each number and use it to print records wherein the 5th
field matches the user ID pulled from the first file. Naively, I thought success
was a while loop away.
while read line;do awk -F'\t' '$5 ~ /line/ {print $0}' line="$line" FULL-RECORDS.txt;done < USER-ID.txt > new.txt
As you can see, the second file contains full records ( tab delimited ) for each user
like so ( sanitized for your pleasure ):
"CHUCKLES, WARREN P." 04 555 FAKE ADDRESS (302) 555-5555 545465 120
"CORMORANT, HOPPY P." 04 565 FAKE ADDRESS (302) 555-5555 545466 120
Advice?
Thanks for reading!
Bubnoff