I have a Expect script that works for my prompts but we are thinking about sharing it w/ other UNIX groups within the company. Problem is their prompts are most likely different. So what I need to do is something like this:
expect -exact "login:"
send -- "$user\r" #user name
expect -exact "$user's Password: "
send -- "$pass\r" #user password
expect "What ever their prompt might be"
I think you can do a set prompt "various prompts" and just expect $prompts, or something like that. Any help would be great.
Grepper
expect -exact "login:"
send -- "$user\r" #user name
expect -exact "$user's Password: "
send -- "$pass\r" #user password
expect "What ever their prompt might be"
I think you can do a set prompt "various prompts" and just expect $prompts, or something like that. Any help would be great.
Grepper