In this post I will be showing you how to use expect in your scripts as a command instead of as a script itself. This can be useful for automatically responding when running other commands and more.
Today I will be showing you how to use a basic expect script inside of your bash scripts for automation. Expect works just like the name sounds, expect to see a prompt or other piece of text and then send the response. With this you can do things such as automatically entering password for SSH (not recommended for daily use), automatically answer prompts, etc.