Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The venerable "expect"
Search
Bruno Sutic
January 29, 2015
Programming
0
52
The venerable "expect"
Expect tool fundamentals. Accompanying code:
https://gist.github.com/bruno-/dc4255f6d426af00c240
Bruno Sutic
January 29, 2015
Tweet
Share
More Decks by Bruno Sutic
See All by Bruno Sutic
Readline + irb/pry = <3
brunosutic
0
100
Moreutils
brunosutic
0
42
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
420
Configuring tmux
brunosutic
0
69
Introduction to Arel
brunosutic
1
190
Tmux osnove
brunosutic
0
160
Deploying Rails apps with Capistrano
brunosutic
0
69
Other Decks in Programming
See All in Programming
Scaling your build logic
antalmonori
1
100
最近のVS Codeで気になるニュース 2025/01
74th
1
100
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
return文におけるstd::moveについて
onihusube
1
1.4k
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
300
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
210
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
1.4k
PHPカンファレンス 2024|共創を加速するための若手の技術挑戦
weddingpark
0
140
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
290
functionalなアプローチで動的要素を排除する
ryopeko
1
210
AppRouterを用いた大規模サービス開発におけるディレクトリ構成の変遷と問題点
eiganken
1
450
Featured
See All Featured
Facilitating Awesome Meetings
lara
51
6.2k
How STYLIGHT went responsive
nonsquared
96
5.3k
Visualization
eitanlees
146
15k
Rails Girls Zürich Keynote
gr2m
94
13k
Building an army of robots
kneath
302
45k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
19
2.3k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Statistics for Hackers
jakevdp
797
220k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Transcript
The venerable “expect”
About: Bruno Sutic, github.com/bruno-/ Rails & Javascript developer Ideal Project
Group, Chicago
What is expect? • a classic Unix tool • enables
automating *everything* in the terminal • written in 1990, Tcl
Can’t script everything • ssh password entry? • sudo password
entry? • doing multiple ssh “hops”, usually password protected (enterprises, telecoms) • interactive command line applications (tmux) • (short demo)
Expect is… • surprisingly easy to learn • powerful •
easily available (installed by default on OS X) • does not replace scripting, use it for small % of tasks
Demo automating ssh tasks
Commands summary • spawn - starts a program • expect
- “listens” for output • send - “types” program input • interact - gives control to the user
Commands summary • log_user 0 - make the script quiet
• puts - print to the screen • set timeout 10 … timeout { exit 1 }
My real-world usage examples • Ericsson NT - automating SSH
connections (3-4 hops) • Automated testing for tmux plugins • tmux plugin manager • tmux copycat
Questions?