1

Passing username and password to a script running inside "expect" scri

view story
linux-howto

http://www.unix.com – Hi I'm trying to run a script " abc.sh" which triggers "use.sh" . abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script. Please find below the scripts: #abc.sh Code: #!/usr/bin/expect -f exec /root/use.sh expect "*name*" send "baddy\r" expect "*word*" send "compaq\r" expect eof my second script use.sh is placed in /root/ directory.. please find the script below: Code: #!/bin/sh echo "Username: " read u echo "Password: " read p echo & (HowTos)