This doesn't work:
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...
Hi! Basically, I have 2 text files and need to combine them into one while making a few changes. The commands I came up with were too long/slow so I figured some more familiar with awk could help me.
Basically I have these 2 files, were N~50000 :
file1.res
1 a1 a2 ... a13
2 b1 b2 ... b13
...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.