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
53
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
450
Configuring tmux
brunosutic
0
88
Introduction to Arel
brunosutic
1
260
Tmux osnove
brunosutic
0
180
Deploying Rails apps with Capistrano
brunosutic
0
96
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
420
詳細の決定を遅らせつつ実装を早くする
shimabox
1
990
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
110
KoogではじめるAIエージェント開発
hiroaki404
1
420
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
130
AI POSにおけるLLM Observability基盤の導入 ― サイバーエージェントDXインターン成果報告
hekuchan
0
470
仕様がそのままテストになる!Javaで始める振る舞い駆動開発
ohmori_yusuke
4
1.6k
SUZURIの規約違反チェックにおけるクリエイタフィードバックの試⾏錯誤/Trial and Error in Creator Feedback for SUZURI's Terms of Service Violation Checks
ae14watanabe
1
140
Core MIDI を勉強して作曲用の電子ピアノ作ってみた!
hypebeans
0
100
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
1
270
Private APIの呼び出し方
kishikawakatsumi
2
830
Agentに至る道 〜なぜLLMは自動でコードを書けるようになったのか〜
mackee
4
520
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Unsuck your backbone
ammeep
671
58k
Balancing Empowerment & Direction
lara
5
740
Measuring & Analyzing Core Web Vitals
bluesmoon
9
660
Context Engineering - Making Every Token Count
addyosmani
9
380
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Producing Creativity
orderedlist
PRO
348
40k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
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?