Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
56
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
450
Configuring tmux
brunosutic
0
95
Introduction to Arel
brunosutic
1
260
Tmux osnove
brunosutic
0
190
Deploying Rails apps with Capistrano
brunosutic
0
99
Other Decks in Programming
See All in Programming
sbt 2
xuwei_k
0
190
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
11
6.9k
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
120
AIコーディングエージェント(Gemini)
kondai24
0
150
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
1.9k
認証・認可の基本を学ぼう前編
kouyuume
0
150
CSC509 Lecture 14
javiergs
PRO
0
220
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
150
Google Antigravity and Vibe Coding: Agentic Development Guide
mickey_kubo
2
130
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
2
2k
20 years of Symfony, what's next?
fabpot
2
310
モダンJSフレームワークのビルドプロセス 〜なぜReactは503行、Svelteは12行なのか〜
fuuki12
0
190
Featured
See All Featured
How GitHub (no longer) Works
holman
316
140k
Documentation Writing (for coders)
carmenintech
76
5.2k
How to Ace a Technical Interview
jacobian
280
24k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.2k
Docker and Python
trallard
46
3.7k
Writing Fast Ruby
sferik
630
62k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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?