Learn Expect By Writing And Automating A Simple Game
Code a “guess the number” game in Expect. Then, learn the real power of Expect with a separate script to automate playing the game. While trying to automate my workflow, I hit upon a configuration utility that defied meaningful automation. It was a Java process that didn’t support a silent installer, or support stdin, and had an inconsistent set of prompts. Ansible’s expect module was inadequate for this task. But I found that the expect command was just the tool for the job. My journey to learn Expect meant learning a bit of Tcl. Now that I have the background to create simple programs, I can better…
Share