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
61
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
46
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
450
Configuring tmux
brunosutic
0
79
Introduction to Arel
brunosutic
1
240
Tmux osnove
brunosutic
0
180
Deploying Rails apps with Capistrano
brunosutic
0
89
Other Decks in Programming
See All in Programming
なぜあなたのオブザーバビリティ導入は頓挫するのか
ryota_hnk
5
580
CEDEC 2025 『ゲームにおけるリアルタイム通信への QUIC導入事例の紹介』
segadevtech
3
790
Workers を定期実行する方法は一つじゃない
rokuosan
0
140
Reactの歴史を振り返る
tutinoko
1
170
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
330
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
500
MySQL9でベクトルカラム登場!PHP×AWSでのAI/類似検索はこう変わる
suguruooki
1
290
Google I/O Extended Incheon 2025 ~ What's new in Android development tools
pluu
1
250
Jakarta EE Meets AI
ivargrimstad
0
620
ZeroETLで始めるDynamoDBとS3の連携
afooooil
0
150
WebAssemblyインタプリタを書く ~Component Modelを添えて~
ruccho
1
640
Nuances on Kubernetes - RubyConf Taiwan 2025
envek
0
110
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
95
14k
GitHub's CSS Performance
jonrohan
1031
460k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Code Review Best Practice
trishagee
69
19k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
183
54k
Designing Experiences People Love
moore
142
24k
Thoughts on Productivity
jonyablonski
69
4.8k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
430
Testing 201, or: Great Expectations
jmmastey
45
7.6k
RailsConf 2023
tenderlove
30
1.2k
4 Signs Your Business is Dying
shpigford
184
22k
Building Applications with DynamoDB
mza
95
6.5k
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?