Search Results

Search: Posts Made By: satyar
1,546
Posted By Don Cragun
To work correctly, both files being joined need...
To work correctly, both files being joined need to be sorted on the fields that are to be used as the matching fields. Since File 1 has the values in the order
P
S
Cinstead of
C
P
Sfor the...
1,549
Posted By Don Cragun
Assuming that you saved the above awk script in a...
Assuming that you saved the above awk script in a file (say satya.awk for purposes of this discussion), and then ran the command:
awk -f satya.awk File1then it might or might now work since setting...
1,549
Posted By rdrtx1
try: awk ' ! a[$1] {a[$1]=$1} { for (i=2;...
try:
awk '
! a[$1] {a[$1]=$1}
{ for (i=2; i<=NF; i++) a[$1]=a[$1] OFS $i; }
END {for (i in a) print a[i]}
' File1 File2
Showing results 1 to 3 of 3

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