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
69
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
140
Moreutils
brunosutic
0
65
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
460
Configuring tmux
brunosutic
0
110
Introduction to Arel
brunosutic
1
290
Tmux osnove
brunosutic
0
200
Deploying Rails apps with Capistrano
brunosutic
0
120
Other Decks in Programming
See All in Programming
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
530
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
230
AHC061解説
shun_pi
0
410
CSC307 Lecture 14
javiergs
PRO
0
480
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.3k
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
1.2k
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
140
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
230
SourceGeneratorのマーカー属性問題について
htkym
0
210
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
210
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
580
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
170
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Thoughts on Productivity
jonyablonski
75
5.1k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Why Our Code Smells
bkeepers
PRO
340
58k
Exploring anti-patterns in Rails
aemeredith
2
290
Statistics for Hackers
jakevdp
799
230k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
650
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Utilizing Notion as your number one productivity tool
mfonobong
4
270
Git: the NoSQL Database
bkeepers
PRO
432
67k
Evolving SEO for Evolving Search Engines
ryanjones
0
160
BBQ
matthewcrist
89
10k
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?