sed - combine one colum from two files into a thrid file -


i have 2 files a.txt , b.txt contains following data.

$ cat a.txt 0x5212cb03caa111e0 0x5212cb03caa113c0 0x5212cb03caa115c0 0x5212cb03caa117c0 0x5212cb03caa119e0 0x5212cb03caa11bc0 0x5212cb03caa11dc0 0x5212cb03caa11fc0 0x5212cb03caa121c0  $ cat b.txt 36 65 fb 60 7a 5e 36 65 fb 60 7a 64 36 65 fb 60 7a 6a 36 65 fb 60 7a 70 36 65 fb 60 7a 76 36 65 fb 60 7a 7c 36 65 fb 60 7a 82 36 65 fb 60 7a 88 36 65 fb 60 7a 8e 

i want generate third file c.txt contains

0x5212cb03caa111e0      36 65 fb 60 7a 5e 0x5212cb03caa113c0      36 65 fb 60 7a 64  0x5212cb03caa115c0      36 65 fb 60 7a 6a 

can achieve using awk? how do this?

paste shortest solution, if you're looking awk solution stated in question then:

awk 'fnr==nr{a[++i]=$0;next} {print a[fnr] "\t" $0}' a.txt b.txt 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -