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
81
Introduction to Arel
brunosutic
1
250
Tmux osnove
brunosutic
0
180
Deploying Rails apps with Capistrano
brunosutic
0
89
Other Decks in Programming
See All in Programming
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
400
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
11
4.4k
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
260
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
570
楽して成果を出すためのセルフリソース管理
clipnote
0
190
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
440
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
510
より安全で効率的な Go コードへ: Protocol Buffers Opaque API の導入
shwatanap
2
790
1から理解するWeb Push
dora1998
7
1.9k
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
350
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
4.3k
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
Featured
See All Featured
Fireside Chat
paigeccino
39
3.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Side Projects
sachag
455
43k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
530
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
The Art of Programming - Codeland 2020
erikaheidi
56
13k
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?