Search Results

Search: Posts Made By: andmal
1,692
Posted By RudiC
PLEASE start becoming exact and consistent when...
PLEASE start becoming exact and consistent when posting your problems here, also across posts, making samples match what you say in the text.
People (not only) in here tend to refer to the...
1,692
Posted By vgersh99
you might/will run out of the opened file...
you might/will run out of the opened file descriptors.
Here's a slight variation on the theme:

awk '
FNR==NR {f21[$1]=$3
f22[$2]=$3
next
...
1,692
Posted By RudiC
With a VERY sloppy interpretation of "along these...
With a VERY sloppy interpretation of "along these lines" you might come close to the desired result, once you corrected the syntax / redirection error in the before-last line, and accepted the higher...
1,692
Posted By vgersh99
to start with: awk ' FNR==NR { ...
to start with:

awk '
FNR==NR {
f21[$1]=$3
f22[$2]=$3
next
}
$1 in f21 { print $0, f21[$1];next }
$1 in f22 { print $0, f21[$1] }
' file2 file1
2,155
Posted By RudiC
Still not unambiguous. Try awk ' NR == FNR ...
Still not unambiguous. Try
awk '
NR == FNR {T[$2] = $0
next
}
($2 in T) {print T[$2], $NF
}
($3 in T) {print T[$3], $NF
...
Showing results 1 to 5 of 5

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