Reputation: 11
I want to automate .sh installation. So, I have to key press 'Arrow down' key for selection and press 'Enter'.
./install.sh
expect "Welcome"
send "{down}"
expect "install"
send "Enter"
Upvotes: 1
Views: 3584
Reputation: 1491
If you are using Linux, you can use xdotool
to simulate keystrokes:
# To press the down arrow key
$ xdotool key Down
# To press the Enter key
$ xdotool key Return
Upvotes: 3