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
65
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
59
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
460
Configuring tmux
brunosutic
0
100
Introduction to Arel
brunosutic
1
270
Tmux osnove
brunosutic
0
190
Deploying Rails apps with Capistrano
brunosutic
0
110
Other Decks in Programming
See All in Programming
今から始めるClaude Code超入門
448jp
8
8.7k
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
AI & Enginnering
codelynx
0
110
CSC307 Lecture 04
javiergs
PRO
0
660
CSC307 Lecture 08
javiergs
PRO
0
670
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
960
Fluid Templating in TYPO3 14
s2b
0
130
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
700
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
210
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
dchart: charts from deck markup
ajstarks
3
990
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Visualization
eitanlees
150
17k
Become a Pro
speakerdeck
PRO
31
5.8k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
94
How STYLIGHT went responsive
nonsquared
100
6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
The Pragmatic Product Professional
lauravandoore
37
7.1k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
66
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?