Skip to content

Instantly share code, notes, and snippets.

View Piping's full-sized avatar
🎯
Focusing

Piping

🎯
Focusing
View GitHub Profile
@Piping
Piping / motd
Created August 24, 2017 23:13
add login message with "FBI WARNING"
 FBI WARNING 
Federal Law provides severe civil and criminal penalties for
the unauthorized reproduction, distribution, or exhibition of
copyrighted motion pictures (Title 17, United States Code,
Sections 501 and 508). The Federal Bureau of Investigation
investigates allegations of criminal copyright infrigement
(Title 17, United States Code, Section 506)
@Piping
Piping / expecting.md
Created September 8, 2019 05:22 — forked from ksafranski/expecting.md
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect