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
56
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
110
Moreutils
brunosutic
0
45
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
430
Configuring tmux
brunosutic
0
73
Introduction to Arel
brunosutic
1
210
Tmux osnove
brunosutic
0
170
Deploying Rails apps with Capistrano
brunosutic
0
80
Other Decks in Programming
See All in Programming
コンテナでLambdaをデプロイするときに知っておきたかったこと
_takahash
0
160
英語 × の私が、生成AIの力を借りて、OSSに初コントリビュートした話
personabb
0
160
複数ドメインに散らばってしまった画像…! 運用中のPHPアプリに後からCDNを導入する…!
suguruooki
0
450
Do Dumb Things
mitsuhiko
0
370
家族・子育て重視/沖縄在住を維持しながらエンジニアとしてのキャリアをどのように育てていくか?
ug
0
260
List とは何か? / PHPerKaigi 2025
meihei3
0
590
PHPによる"非"構造化プログラミング入門 -本当に熱いスパゲティコードを求めて- #phperkaigi
o0h
PRO
0
1.2k
これだけは知っておきたいクラス設計の基礎知識 version 2
masuda220
PRO
18
4.1k
フロントエンドテストの育て方
quramy
11
2.8k
Chrome Extension Techniques from Hell
moznion
1
100
PHPでお金を扱う時、終わりのない 謎の1円調査の旅にでなくて済む方法
nakka
4
1.4k
AtCoder Heuristic First-step Vol.1 講義スライド(山登り法・焼きなまし法編)
takumi152
4
1k
Featured
See All Featured
Unsuck your backbone
ammeep
670
57k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Adopting Sorbet at Scale
ufuk
75
9.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
8
720
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
It's Worth the Effort
3n
184
28k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
GraphQLとの向き合い方2022年版
quramy
45
14k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Building Adaptive Systems
keathley
41
2.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
30k
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?