Can I ask why you don't want to use perl? This is exactly the sort of thing perl was made for...
Now if your question is purely the match portion of it you could use something like this: echo $num/6*100 | bc -l
to calculate your percentage. However if your question is how do you associate 12345678 in names
with 13245678 in results
then I'd say use perl.