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
52
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
43
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
430
Configuring tmux
brunosutic
0
71
Introduction to Arel
brunosutic
1
210
Tmux osnove
brunosutic
0
160
Deploying Rails apps with Capistrano
brunosutic
0
74
Other Decks in Programming
See All in Programming
Domain-Driven Design (Tutorial)
hschwentner
13
22k
Drawing Heighway’s Dragon- Recursive Function Rewrite- From Imperative Style in Pascal 64 To Functional Style in Scala 3
philipschwarz
PRO
0
100
CloudNativePGを布教したい
nnaka2992
0
120
Go 1.24でジェネリックになった型エイリアスの紹介
syumai
2
300
Generating OpenAPI schema from serializers throughout the Rails stack - Kyobashi.rb #5
envek
1
390
Unity Android XR入門
sakutama_11
0
180
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
250
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
480
未経験でSRE、はじめました! 組織を支える役割と軌跡
curekoshimizu
1
170
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
960
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
55
19k
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
2
340
Featured
See All Featured
It's Worth the Effort
3n
184
28k
Adopting Sorbet at Scale
ufuk
75
9.2k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Designing Experiences People Love
moore
140
23k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
580
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Gamification - CAS2011
davidbonilla
80
5.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
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?