Search Results

Search: Posts Made By: Corona688
3,343
Posted By Corona688
$ awk 'NR==FNR { C[$1]++; L[$1, C[$1]]=$0; D[$1,...
$ awk 'NR==FNR { C[$1]++; L[$1, C[$1]]=$0; D[$1, C[$1]]=$2 ; next }
C[$1] { for(N=1; N<=C[$1]; N++) if(D[$1, N]==$3) print L[$1, N], $0 }' file1 file2

1334 10 0 0 1 5.2 1334 14 10 0 2 5.5
1340...
3,343
Posted By Corona688
$ awk 'NR==FNR{D[$1]=$0}; (NR!=FNR) && D[$1] &&...
$ awk 'NR==FNR{D[$1]=$0}; (NR!=FNR) && D[$1] && (!S[$1]++) { print D[$1], $0 }' file1 file2

1334 12 0 0 1 4.5 1334 14 10 0 2 5.5
1340 11 0 0 1 3.5 1340 8 11 0 1 5.6

$
3,343
Posted By Corona688
To keep the forums high quality for all users,...
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read...
Showing results 1 to 3 of 3

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