expect is a tool built using Tcl which allows you to automate many tasks that would otherwise mean tedious repetition at the command line. While many tools come with a command line interface, they don’t lend themselves well to scripting — telnet is the classic example. But with expect you can script these tools as easily as bash.