Instead of getting the script to ask for the ibay name, pass the name as a commandline parameter, like this:
drupal_setup <ibayname>
In the script, substitute $1 for the ibayname. for example:
db accounts setprop $1 PHPBaseDir /tmp/:/home/e-smith/files/ibays/$1
Easy!