I would like to calculate percentage of value in each line out of all lines and add it as another column. Input (delimiter is \\t):
1 10 2 10 3 20 4
You need to escape it as %%. For instance:
%%
printf("%s\t%s\t%s%%\n", $1, $2, $3)