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
43
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
91
Moreutils
brunosutic
0
37
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
410
Configuring tmux
brunosutic
0
58
Introduction to Arel
brunosutic
1
160
Tmux osnove
brunosutic
0
97
Deploying Rails apps with Capistrano
brunosutic
0
61
Other Decks in Programming
See All in Programming
オブジェクト指向コードレビューの新しいアプローチ
akkie76
3
1.1k
Creating Retro-Style Photos Using Swift
ski
1
340
どうしてこうなった命名集 ~🔥編~ / OOC 2024 LT
pictiny
4
2.7k
せっかくモデル図描くのなら、嬉しいことが多い方がいいよね!
kuboaki
1
1.2k
The Future of C++ Interoperability: Insights from Porting a Game to Swift
teamhimeh
0
260
Cloud RunとCloud PubSubでサーバレスなデータ基盤2024 with Terraform / Cloud Run and PubSub with Terraform
shinyorke
7
1.9k
DDD, necessary but insufficient: physical design principles for microservices
cer
PRO
0
2.1k
C# 大統一理論推進委員会 会員のための Unity Package Manager プロジェクト構成案
monry
PRO
0
580
WasmOS: Wasmを実行する自作Microkernel
riru
0
370
ここ1~2年くらいで 使えるようになった(主要ブラウザーの最新版 がすべて対応した ) ウェブの新機能について ランダムに喋る!
myzkyy
9
6.4k
Building a Smaller App Binary
kateinoigakukun
2
190
ドメイン・ファーストで考える問題解決に役立つモデル設計 / Domain First Model Design
suzushin54
1
940
Featured
See All Featured
What's new in Ruby 2.0
geeforr
335
31k
Git: the NoSQL Database
bkeepers
PRO
421
63k
Music & Morning Musume
bryan
39
5.5k
The Cost Of JavaScript in 2023
addyosmani
13
3.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.8k
Become a Pro
speakerdeck
PRO
8
4.4k
A Philosophy of Restraint
colly
195
15k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
1
3.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
240
1.2M
Clear Off the Table
cherdarchuk
82
310k
Principles of Awesome APIs and How to Build Them.
keavy
119
16k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
219
21k
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?