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
52
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
100
Moreutils
brunosutic
0
42
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
420
Configuring tmux
brunosutic
0
70
Introduction to Arel
brunosutic
1
200
Tmux osnove
brunosutic
0
160
Deploying Rails apps with Capistrano
brunosutic
0
72
Other Decks in Programming
See All in Programming
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
color-scheme: light dark; を完全に理解する
uhyo
3
310
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
270
GoとPHPのインターフェイスの違い
shimabox
2
190
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
160
ARA Ansible for the teams
kksat
0
150
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
260
Ruby on cygwin 2025-02
fd0
0
140
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
150
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
120
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.3k
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1k
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Building Applications with DynamoDB
mza
93
6.2k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.3k
Git: the NoSQL Database
bkeepers
PRO
427
64k
A Philosophy of Restraint
colly
203
16k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Invisible Side of Design
smashingmag
299
50k
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?