How To pass argument in Expect command?
Hi all,
Could you plz tell me the syntax of passing the arguments in the expect script. |
to pass arguments into anything....
command [arguments] but I think you are talking more like passing output into the command... so, use a pipe... command | expect..... this takes command and feeds it into expect... |
How To pass argument in Expect command?
Hi
I have script like this #!/usr/bin/expect -f spawn ssh user@192.168.2.3 expect "password: " send "mypassword\r" interact My doubt is how to get the password as an argument . In this script. Is there way to get the argument like in shell ( $1). |
Quote:
Code:
#!/usr/bin/expect -f Code:
set arg2 [lindex $argv 1] Good luck. -- RT |
All times are GMT -5. The time now is 06:25 PM. |