rendered paste bodycat <<EOFfunction pc # putchar{ typeset x x=\$(printf "%x\n" "\$1") printf "\u[\${x}]"}function gc # getchar{ nameref x="\$1" typeset c if read -N1 c ; then (( x='\${c} )) else (( x=-1 )) # EOF fi}set -o noglobIFS=''integer -a tinteger p(( p= 2**16 )) # tape start positionEOFwhile read -N1 c ; do case "$c" in '>') print '(( ++p ))' ;; '<') print '(( --p ))' ;; '+') print '(( ++t[p] ))' ;; '-') print '(( --t[p] ))' ;; '.') print 'pc ${t[p]}' ;; ',') print 'gc t[p]' ;; '[') print 'while (( t[p] != 0 )) ; do' ;; ']') print 'done' ;; esacdone