I have a file like this. input data4.2394 4.45694.2427 4.10114.2879 4.12374.2106 4.48444.2373 4.10714.1322 4.05024.3103 4.42554.4342 4.5262I need to multiply each element by a constant factor (in this example the factor is 8.06573) to produce an output like this:output 34.193855762    35.94815203734.220472671    33.07836530334.585043667    33.26065080133.961562738    36.16995961234.176917729    33.12675968333.329209506    32.66781964634.765716019    35.69488811535.765059966    36.507107126
How to multiply two columns in a file by a constant number
shell script;awk;sed;numeric data
I think this does what you want; it accepts an awk variable named factor that is can easily be set to whatever you want:awk -v factor=8.06573 '{printf %2.9f %2.9f\n, $1 * factor, $2 * factor}' With the given input, it outputs:34.193855762 35.94815203734.220472671 33.07836530334.585043667 33.26065080133.961562738 36.16995961234.176917729 33.12675968333.329209506 32.66781964634.765716019 35.69488811535.765059966 36.507107126