in reply to Controlling the shell...

My recommendation would be that since passing a password on the command line is a Bad Idea[1], you would be better off sending the password some other way. If you are really using ssh, use a keypair with either ssh-agent [2]or with keys that don't have passwords.

If it is a different piece of software than ssh, even though ssh is in the example, I would recommend looking to see if you can have it read the password some other way.

I realise that doesn't help with passing special characters to a shell command, but passwords are not something I would think you really want that easily available.

[1] the output of ps will show the password for one
[2] it, or something similar should be available on most *nix OS's

UPDATE: Rereading the inital post, I see that it looks like ssh is using passwordless auth, and the password is passed to 'autopasswd_oracle.exp', but I would still recommend finding a different way to pass the password.

andrew