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
57
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
120
Moreutils
brunosutic
0
45
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
440
Configuring tmux
brunosutic
0
76
Introduction to Arel
brunosutic
1
230
Tmux osnove
brunosutic
0
170
Deploying Rails apps with Capistrano
brunosutic
0
87
Other Decks in Programming
See All in Programming
TSConfig Solution Style & subpath imports to switch types on a per-file basis
maminami373
1
180
AI Coding Agent Enablement in TypeScript
yukukotani
17
7.2k
❄️ tmux-nixの実装を通して学ぶNixOSモジュール
momeemt
1
120
クラシルリワードにおける iOSアプリ開発の取り組み
funzin
1
810
イベントソーシングとAIの親和性ー物語とLLMに理解できるデータ
tomohisa
1
160
Zennの運営完全に理解した #完全に理解したTalk
wadayusuke
1
140
eBPFを用いたAIネットワーク監視システム論文の実装 / eBPF Japan Meetup #4
yuukit
3
620
Use Perl as Better Shell Script
karupanerura
0
650
がんばりすぎないコーディングルール運用術
tsukakei
1
180
💎 My RubyKaigi Effect in 2025: Top Ruby Companies 🌐
yasulab
PRO
1
130
"使いづらい" をリバースエンジニアリングする UI の読み解き方
rebase_engineering
0
110
AIにコードを生成するコードを作らせて、再現性を担保しよう! / Let AI generate code to ensure reproducibility
yamachu
7
6k
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
180
53k
The Cost Of JavaScript in 2023
addyosmani
49
8.1k
How GitHub (no longer) Works
holman
314
140k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
1
79
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.8k
Balancing Empowerment & Direction
lara
1
84
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
15
890
What's in a price? How to price your products and services
michaelherold
245
12k
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?