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
47
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
450
Configuring tmux
brunosutic
0
83
Introduction to Arel
brunosutic
1
250
Tmux osnove
brunosutic
0
180
Deploying Rails apps with Capistrano
brunosutic
0
93
Other Decks in Programming
See All in Programming
高度なUI/UXこそHotwireで作ろう Kaigi on Rails 2025
naofumi
4
4k
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
570
Flutterで分数(Fraction)を表示する方法
koukimiura
0
130
いま中途半端なSwift 6対応をするより、Default ActorやApproachable Concurrencyを有効にしてからでいいんじゃない?
yimajo
2
400
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
130
Range on Rails ―「多重範囲型」という新たな選択肢が、複雑ロジックを劇的にシンプルにしたワケ
rizap_tech
0
120
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
240
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
1.3k
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3.6k
ALL CODE BASE ARE BELONG TO STUDY
uzulla
8
680
Devoxx BE - Local Development in the AI Era
kdubois
0
130
CSC305 Lecture 04
javiergs
PRO
0
270
Featured
See All Featured
Done Done
chrislema
185
16k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
900
Practical Orchestrator
shlominoach
190
11k
A Tale of Four Properties
chriscoyier
161
23k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Designing for Performance
lara
610
69k
Context Engineering - Making Every Token Count
addyosmani
5
230
Agile that works and the tools we love
rasmusluckow
331
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
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?