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
組織で育むオブザーバビリティ
ryota_hnk
0
160
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
170
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
620
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
200
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
590
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.8k
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
260
今から始めるClaude Code超入門
448jp
7
7.3k
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
860
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
100
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
190
Featured
See All Featured
From π to Pie charts
rasagy
0
120
Optimizing for Happiness
mojombo
379
71k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
280
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
30 Presentation Tips
portentint
PRO
1
200
Designing Experiences People Love
moore
144
24k
Crafting Experiences
bethany
1
43
Git: the NoSQL Database
bkeepers
PRO
432
66k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
48
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Deep Space Network (abreviated)
tonyrice
0
37
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
160
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?