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
65
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
140
Moreutils
brunosutic
0
59
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
460
Configuring tmux
brunosutic
0
100
Introduction to Arel
brunosutic
1
270
Tmux osnove
brunosutic
0
190
Deploying Rails apps with Capistrano
brunosutic
0
110
Other Decks in Programming
See All in Programming
Oxlintはいいぞ
yug1224
5
1.3k
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
980
CSC307 Lecture 07
javiergs
PRO
0
550
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
250
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
910
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
47
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
190
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
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?