This doesn't work:
I'm trying to make a list of catalog entries that match the line headers in file1. The program instead outputs a copy of file1. That doesn't make much sense...
Code:
awk '
NR == FNR
{ x=$1 ; next }
{ y=$1 }
{if (x==y) print $0}
' file1.in catalog.cat > file2.res
I'm trying to make a list of catalog entries that match the line headers in file1. The program instead outputs a copy of file1. That doesn't make much sense...