Search Results

Search: Posts Made By: Jaymz
1,353
Posted By Yoda
That is correct.
That is correct.
2,320
Posted By radoulov
awk 'END { for (i = 0; ++i <= FNR;) ...
awk 'END {
for (i = 0; ++i <= FNR;)
print r[i]
}
NR == FNR {
f[$1] = substr($0, index($0, $2))
next
}
{
for (i = 0; ++i <= NF;)
$i in f && r[FNR] = (r[FNR] ? r[FNR] :...
2,320
Posted By rdcwayx
Another way. awk 'NR==FNR{c[$1 FS $2];next}...
Another way.

awk 'NR==FNR{c[$1 FS $2];next} {a[$1]=a[$1] FS $2 FS $3}
END{for ( i in c) {split(i,x,FS);if (x[1]!=x[2]) print i,a[x[1]],a[x[2]]}}' file1 file2
2,320
Posted By ctsgnb
nawk 'NR==FNR{A[$3]=$5;next}{print $0 (($4 in...
nawk 'NR==FNR{A[$3]=$5;next}{print $0 (($4 in A)?FS A[$4]:z)}' file1 file2

---------- Post updated at 07:27 PM ---------- Previous update was at 07:26 PM ----------

$ cat f1
john doe 123 left...
2,320
Posted By rdcwayx
awk 'NR==FNR{a[$3]=$5;next}{print $0,a[$4]}'...
awk 'NR==FNR{a[$3]=$5;next}{print $0,a[$4]}' file1 file2
2,320
Posted By radoulov
awk 'END { for (i = 0; ++i <= FNR;) if...
awk 'END {
for (i = 0; ++i <= FNR;)
if (i in r) print r[i]
}
NR == FNR {
f[$1] = substr($0, index($0, $2))
next
}
$1 != $2 {
for (i = 0; ++i <= NF;)
$i in f && r[FNR]...
Showing results 1 to 6 of 6

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