awk ' NR > max { max=NR } { tot+=$1; v[NR]=$1; d[NR]=$2 } END { for (i=1; i<=max; i++) { print v[i]*100/tot,v[i],d[i] } } ' inputfile