Search Results

Search: Posts Made By: singgih
2,659
Posted By neutronscott
I thought I did? :) NR is internal variable...
I thought I did? :) NR is internal variable which holds the record number. So basically is the line number in this case. FNR is per-file, so if they're equal you're currently processing a line in...
2,659
Posted By neutronscott
Oh yes, sorry. I suppose I could have posted it...
Oh yes, sorry. I suppose I could have posted it while awaiting confirmation.


#!/usr/bin/awk -f
BEGIN { FS=OFS="," }
FNR==NR { a[$1]=$2; next }
($3 in a) { print $1, $2, a[$3], $4 }


Is...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 07:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy