Skip to content

Instantly share code, notes, and snippets.

@serg-z
Created April 3, 2014 04:43
Show Gist options
  • Select an option

  • Save serg-z/9948384 to your computer and use it in GitHub Desktop.

Select an option

Save serg-z/9948384 to your computer and use it in GitHub Desktop.
Note - expect test
#!/bin/bash
echo testo?
read VAR
echo password?
read VV
echo ">$VAR"
echo ">$VV"
#!/usr/bin/expect -f
spawn ./erun
expect {
-re ".*es.*o.*" {
exp_send "yes\r"
exp_continue
}
-re ".*sword.*" {
exp_send "no\r"
exp_continue
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment