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
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
2
580
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
180
株式会社 Sun terras カンパニーデック
sunterras
0
370
CSC305 Lecture 04
javiergs
PRO
0
270
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
230
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
270
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
520
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
200
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
170
AI Agent 時代的開發者生存指南
eddie
3
2k
Devoxx BE - Local Development in the AI Era
kdubois
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Unsuck your backbone
ammeep
671
58k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
620
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
A better future with KSS
kneath
239
18k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
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?