Search Results

Search: Posts Made By: djoseph
14,973
Posted By Scrutinizer
You will find are many examples of this kind of...
You will find are many examples of this kind of join operation.. Try:
awk 'NR==FNR{A[$2]=$1; next} $12==1 && $1 in A{$6=A[$1]}1' FS=, OFS=, file2 file1

--edit--
Mornin' Don ;)
14,973
Posted By Don Cragun
The following awk script seems to do what you...
The following awk script seems to do what you said you want:
awk '
BEGIN { FS = OFS = ","
}
FNR == NR {
k[$2] = $1
next
}
{ if($12 == 1 && $1 in k) $6 = k[$1]
}
1' file2 file1
But, with...
Showing results 1 to 2 of 2

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