paste <(cat csim.stats.txt| grep snap | cut -d "_" -f 6| cut -d "." -f 1 ) <(cat csim.stats.txt| grep "Type= 5" | awk '{n+=$4;printf"%s %s\n",$4,n }') >snap2part.txt