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
69
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
65
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
460
Configuring tmux
brunosutic
0
110
Introduction to Arel
brunosutic
1
290
Tmux osnove
brunosutic
0
200
Deploying Rails apps with Capistrano
brunosutic
0
120
Other Decks in Programming
See All in Programming
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
Claude Code Skill入門
mayahoney
0
400
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
130
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
130
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
440
へんな働き方
yusukebe
2
1.8k
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
390
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
180
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
400
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
230
Ruby and LLM Ecosystem 2nd
koic
1
960
20260315 AWSなんもわからん🥲
chiilog
2
160
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
320
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
180
The SEO identity crisis: Don't let AI make you average
varn
0
420
Automating Front-end Workflow
addyosmani
1370
200k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
990
Code Reviewing Like a Champion
maltzj
528
40k
How to Ace a Technical Interview
jacobian
281
24k
First, design no harm
axbom
PRO
2
1.1k
Claude Code のすすめ
schroneko
67
220k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
290
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?