Reading passwd and need to use it multple times when script asks

Hi Gurus,

I have one requirment..
I have written a script and it asks a registry passwd while performing some clearcase command. Now we are giving it manually. It's for one time run. We want to perform this for multiple times on multiple files throguh for loop.. means we need to pass the same passwd for each file in that loop.

For ex:

 
for i in `cat list`; do
command1
#Here it asks for passwd like below, we have to pass it manually only.
Registry passwd:
command2
command3
.
.
done

We dont have expert binaries in my boxs. so can anyonce suggest any other way on this please?

Thanks in advance..

Regards,
VRN

expect?

sorry for typo, yes,it's expect only and we don't have expect binaries in our Unix boxes and we can not get it also as it's restricted to use.

so is there any other way to pass the passwd?

I got an idea..
read the passwd in script before enter into the loop itself like below, and use that variable to pass passwd multiple times....

echo "Registry passwd:"
read passwd
#Here, i use this $passwd in loop to pass the passwd

but the issue is... when we enter the passwd while executing the script.. it's showing the passwd on the screen... but i dont want it to appear on the screen..

is there anyway to hide the passwd while passing it...?

Thanks in advance....

stty -echo

there are some example scripts that usually come with expect that might help.