$30 off During Our Annual Pro Sale. View Details »
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
63
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
130
Moreutils
brunosutic
0
58
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
450
Configuring tmux
brunosutic
0
99
Introduction to Arel
brunosutic
1
270
Tmux osnove
brunosutic
0
190
Deploying Rails apps with Capistrano
brunosutic
0
100
Other Decks in Programming
See All in Programming
AIコーディングエージェント(Gemini)
kondai24
0
240
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
150
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
110
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
100
ゲームの物理 剛体編
fadis
0
350
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
250
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
130
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
400
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
500
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
180
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
160
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
How to make the Groovebox
asonas
2
1.8k
Bash Introduction
62gerente
615
210k
Prompt Engineering for Job Search
mfonobong
0
110
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Marketing to machines
jonoalderson
1
4.3k
Color Theory Basics | Prateek | Gurzu
gurzu
0
140
Large-scale JavaScript Application Architecture
addyosmani
515
110k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
340
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
110
My Coaching Mixtape
mlcsv
0
6
Writing Fast Ruby
sferik
630
62k
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?