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
47
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
450
Configuring tmux
brunosutic
0
80
Introduction to Arel
brunosutic
1
250
Tmux osnove
brunosutic
0
180
Deploying Rails apps with Capistrano
brunosutic
0
89
Other Decks in Programming
See All in Programming
GitHubとGitLabとAWS CodePipelineでCI/CDを組み比べてみた
satoshi256kbyte
4
150
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
230
サーバーサイドのビルド時間87倍高速化
plaidtech
PRO
0
710
ソフトウェアテスト徹底指南書の紹介
goyoki
1
140
はじめてのMaterial3 Expressive
ym223
2
130
時間軸から考えるTerraformを使う理由と留意点
fufuhu
14
4.5k
アセットのコンパイルについて
ojun9
0
110
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
速いWebフレームワークを作る
yusukebe
5
1.7k
旅行プランAIエージェント開発の裏側
ippo012
2
870
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
140
Flutter with Dart MCP: All You Need - 박제창 2025 I/O Extended Busan
itsmedreamwalker
0
140
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
96
6.2k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
Producing Creativity
orderedlist
PRO
347
40k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Code Review Best Practice
trishagee
70
19k
How STYLIGHT went responsive
nonsquared
100
5.8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
Context Engineering - Making Every Token Count
addyosmani
1
17
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
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?