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
64
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
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
gunshi
kazupon
1
140
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
340
クラウドに依存しないS3を使った開発術
simesaba80
0
220
PC-6001でPSG曲を鳴らすまでを全部NetBSD上の Makefile に押し込んでみた / osc2025hiroshima
tsutsui
0
210
Basic Architectures
denyspoltorak
0
200
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.1k
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
250
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
170
Graviton と Nitro と私
maroon1st
0
160
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
1.8k
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
140
Grafana:建立系統全知視角的捷徑
blueswen
0
280
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Technical Leadership for Architectural Decision Making
baasie
0
210
Un-Boring Meetings
codingconduct
0
180
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.5k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
47
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
140
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Abbi's Birthday
coloredviolet
0
4.3k
Crafting Experiences
bethany
0
29
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
240
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?