Supply Password Thru Script

Hello,
I am using AIX 5 and one of the application does certain db updation daily and runs few script. One script among them calls another program, which in turn asks for a user Id and password. Is there anyway to use 'expect' of something similar on AIX so that while calling that program of userid and password - its get passed automatically and no interaction could take place.

1) Please let me know what piece of code can I merge into my existing script to automate it?
2) IF expect works on AIX, i dont see it in /usr/bin - where to find that?

Please help!

I think it is less a question of using a specific tool but a question of how the application handles its input.

If the application asks for the password and then expects <stdin> to provide it you might be able to use one of the following constructs:

app < $(print - "<password>")
print - "<password>" | app
app < /file/with/password
cat /file/with/password | app

But with ssh (for instance) this would fail. Secure Shell doesn't use the regular <stdin> due to security reasons and you will have to provide the password either by exchanging keys (to speak generally: by applications means) or by hand. If your application falls into the same category all the ways mentioned above will fail.

bakunin