How do I use system() and feed it prompted responses? My responses do not change and so if I can set them once in a txt file or other place that is fine as well.
At the command line, I run the following line to connect to a vpn:
/opt/cisco/anyconnect/bin/vpn -s connect web.site.net <<"EOF"
and this prompts 5 lines which I respond to and then it logs into the VPN:
domain
user
password
exit
EOF
When I try to do the same with a system() call in R, I tried this but no joy:
system('/opt/cisco/anyconnect/bin/vpn -s connect web.site.net <<"EOF"'; "domain"; "user"; "password"; "exit"; "EOF"')
Thank you for reading.