My go-to example for `expect` is password-based SSH. Since we're all enlightened beings these days who surely never use this anymore, there's no risk to it: #!/bin/bash expect -c " spawn ssh user@10.0.0.1 expect \"password:\" send \"12345\r\" interact " `interact` hands you back control to do whatever you want, but you don't actually need to do that. You can have `expect` run every command, fill out every field. The…
https://linux.die.net/man/1/sshpass
...Operations folks today might not understand -- everything just works nowadays, which is slightly boring. And boring is good!
But there's something unique about the feeling of making things work even though they are not designed to work, and really have no right to work. Expect has been a lifesaver for some of the most critical systems at some of the biggest companies in the world.
No aspersions cast by me!