4 ms·
If all software was designed for scale, there would be no use for expect. It's 2019 and I still have expect in production: * to deploy commercial software w
by thyrsus 7y ago
If all software was designed for scale, there would be no use for expect. It's 2019 and I still have expect in production:
* to deploy commercial software whose configuration is only through an interactive terminal session and stored in an undocumented binary format
* to drive gdb to inspect a suspect Red Hat 6 "will not fix" GUI component that can go into an "impossible" pure cpu loop, to determine whether to kill it or whether it's busy in a more benign state.
Edit: the deploy is invoked by ansible, whose own expect module recommends the real expect "for complex cases"
- ridiculous_fish 7y agofish shell uses expect as part of its interactive test suite. It's for more than just automating a workflow!
- geofft 7y agogdb has a batch processing mode and its own scripting language with conditionals, loops, etc., so you could do this entirely with gdb scripting, probably. I've had good luck using gdb scripting for various things, notably conditional-ish breakpoints that printed some debugging info only under certain complicated conditions. (I do concede that if you know expect and not gdb scripting, except is quite likely easier, and it's possible expect is still easier if you know both, depending on the problem.)
- sigjuice 7y agogdb can also be scripted using Python. https://sourceware.org/gdb/onlinedocs/gdb/Python.html https://sourceware.org/gdb/onlinedocs/gdb/Python.html Edit: and Guile
- Terretta 7y agoFor those on mobile or on MacOS w/ Safari, the two bullets above are: - to deploy commercial software whose configuration is only through an interactive terminal session and stored in an undocumented binary format - to drive gdb to inspect a suspect Red Hat 6 "will not fix" GUI component that can go into an "impossible" pure cpu loop, to determine whether to kill it or whether it's busy in a more benign state.