Hello all,
I have these 2 files
File1
123 100
456 200
789 300
File2
|1|2|3||4|5||6|
|1|2|3||4|5||6|
|1|2|3||4|5||6|
I need an output like :
|1|2|3|123|4|5|100|6|
|1|2|3|456|4|5|200|6|
|1|2|3|789|4|5|300|6|
I am trying this piece of code, but it's not working well.
nawk 'NR == FNR {
f1[$1]=$1 ; f1[$2]=$2
next
}
{
print $1 $2 $3 $4 f1[$1] $6 $7 f1[$2] $9
}' ttt1 ttt2
Could anyone help please ?
Thx in advance,