Shell function to convert .png to .svg file
You don’t need eval. For example,

eval "rm \"$pnm_filepath\""


is the same as

rm "$pnm_filepath"


but the latter is more readable.

The same is true for the other two cases where you use eval.

I’m not sure what the purpose is of looping over the dots in the file path. Note that directory names can have dots too. The best way to get a file name with a different extension is to use ${x%.*} (see here):

pnm_filepath=${1%.*}.pnm


(I’m assuming you use Bash).