Hi all,
I have got the following merge problem
file a
a 0001 something
a 0002 something
a 0003 something
a 0004 something
file b
b 0001 1111111111111
b 0002 2222222222222
b 0003 3333333333333
b 0004 4444444444444
File c should look like this
a 0001 something1111111111111
( it should grep awk '{print $2}' from file a)
grep the last word if 0001 matches and add it to the current line.
Thanks
for any awk sollutions
nawk 'FNR==NR {a[$2]=$0;next} $2 in a {print a[$2] $3}' fileA fileB
Thanks for that.
Is there any awk sollution to this as I am using busybox?
isn't the above an 'awk solution'?
Yes, it is, but I got the following problem now.
nawk
-bash: nawk: command not found
That's the reason why I ask for a awk solution
the word 'nawk' sounds/look very similar to 'awk', doesn't it?
'nawk' is NEW awk.
Try the same code with 'awk'..........
And, please, do not multi-post!
I already provide you the solution using
# awk --version
awk version 20070501 (FreeBSD)
What is your operating system ?
Thanks
nawk=awk didn'tknow that.
Exactly what I was looking for many thanks.
Apologize for the double posting