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
61
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
120
Moreutils
brunosutic
0
47
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
450
Configuring tmux
brunosutic
0
81
Introduction to Arel
brunosutic
1
250
Tmux osnove
brunosutic
0
180
Deploying Rails apps with Capistrano
brunosutic
0
89
Other Decks in Programming
See All in Programming
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
540
個人軟體時代
ethanhuang13
0
330
Rancher と Terraform
fufuhu
2
550
Kiroで始めるAI-DLC
kaonash
2
610
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
310
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
230
GitHubとGitLabとAWS CodePipelineでCI/CDを組み比べてみた
satoshi256kbyte
4
240
機能追加とリーダー業務の類似性
rinchoku
2
1.3k
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
3
1.5k
速いWebフレームワークを作る
yusukebe
5
1.7k
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
3.2k
AIコーディングAgentとの向き合い方
eycjur
0
280
Featured
See All Featured
For a Future-Friendly Web
brad_frost
180
9.9k
Optimizing for Happiness
mojombo
379
70k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.8k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
A better future with KSS
kneath
239
17k
The Pragmatic Product Professional
lauravandoore
36
6.9k
The Invisible Side of Design
smashingmag
301
51k
Facilitating Awesome Meetings
lara
55
6.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
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?