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
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
59
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
110
Other Decks in Programming
See All in Programming
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
190
Grafana:建立系統全知視角的捷徑
blueswen
0
240
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.1k
開発に寄りそう自動テストの実現
goyoki
2
1.5k
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
410
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
200
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
630
AtCoder Conference 2025
shindannin
0
720
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
170
Vibe codingでおすすめの言語と開発手法
uyuki234
0
130
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
170
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
5
1.3k
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
300
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
130
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
110
Music & Morning Musume
bryan
46
7k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
170
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
870
WENDY [Excerpt]
tessaabrams
9
35k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Leo the Paperboy
mayatellez
0
1.3k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
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?