Suppose i have a file A
1*2*34
2*4*422
and second file B
2*3*45
4*4*67
By multiplying file A by file B that is file A by first column in file B respectively
output shud be
2*6*1220
8*16*24154
my code is
[CODE][/
for a in A
do
for FILE in B
do
awk 'NR==FNR {
x[FNR] =$1
next
}
{for (f=1;f<=NF;f++)
$f*= x[FNR]
} 1' OFS='' FS='' $a $FILE >file_output
done
done
CODE]
then output was
2*3*45
8*8*1214