Created
October 25, 2018 06:04
-
-
Save sunwayforever/8bf1ad978b283f0b36f8097e42abfda6 to your computer and use it in GitHub Desktop.
expect example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
expect -c " | |
set timeout 10000 | |
spawn sudo pacman -Su | |
expect { | |
\"Proceed with installation\" {send -- y\r} | |
} | |
expect eof | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment