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
『Kubernetes ☸️ で実践する Platform Engineering 』を最高速度で読み抜いたる!!👊🏻
hiroki_hasegawa
0
100
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
210
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
370
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
530
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
PHPで TLSのプロトコルを実装してみる
higaki_program
0
370
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
130
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.6k
[SF Ruby Feb'26] The Silicon Heel
palkan
0
120
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
390
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
130
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
170
Featured
See All Featured
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
130
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
280
Measuring & Analyzing Core Web Vitals
bluesmoon
9
790
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Utilizing Notion as your number one productivity tool
mfonobong
4
270
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
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?