>>816
sed -e 's/\([$`]\)/\\\\\1/g' -e 's!\(([0-9][0-9]*)\)!(\$((\1/5)))!g' -e 's/^/"/'
-e 's/$/"/'|while read l; do eval echo "$l";done

>>818
$((expr))のこといってるならposix shellだよ
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html