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
51
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
69
Introduction to Arel
brunosutic
1
180
Tmux osnove
brunosutic
0
150
Deploying Rails apps with Capistrano
brunosutic
0
68
Other Decks in Programming
See All in Programming
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
cmp.Or に感動した
otakakot
3
180
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
930
初めてDefinitelyTypedにPRを出した話
syumai
0
410
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.9k
Amazon Qを使ってIaCを触ろう!
maruto
0
410
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
32
1.5k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Fireside Chat
paigeccino
34
3k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Code Review Best Practice
trishagee
64
17k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
What's new in Ruby 2.0
geeforr
343
31k
Making Projects Easy
brettharned
115
5.9k
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?