Remove bash-specific code

I don't actually have a machine with Bourne on it.  So, I can't test my changes.  But, I removed the for (;;) loop, which you indicated had erred for you.  And, I believe the "let" command is also a bash-ism.  So, I replaced that with an `expr` command.