'how to autoinput in bash scripting
I'm tired to put username in this input by bash script i run the script but what shall i do when i rich to this line its expecting to input username
Vpn.sh: 1: H8JPgidIAO7T43IP: not found
Vpn.sh: 1: TEL5Fl5bZ6y857IihRmMKEJT0knhxutW: not found
🔐 Enter Auth Username:
Solution 1:[1]
You can use expect:
#!/usr/bin/expect
spawn Vpn.sh
expect "Enter Auth Username:"
send "ThePassword\r"
expect eof
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ErniBrown |