Hello! Well, I searched and wasn't able to find a specific example of my dilemma, so hopefully someone could assist? Or maybe there was an example but I missed it?
I have two files:
file1 = order data file
file2 = list of 65,000+ order numbers
I would like to extract from 'file1' any records which match the numbers in 'file2'.
I am able to extract individual or even multiple numbers from 'file1' by using the following syntax:
awk ' BEGIN{
while (getline i < "file1"){
orderno=substr\(i,4,8\)
if ( orderno == "12345678"){ print i > "outfile"}
\}
\}'
...but I am unsure how to use the contents of 'file2' as my list of order numbers to extract from 'file1'.
Any ideas?
Thanks very much in advance for any assitance provided.