RootPrompt.org: Using expect for System Administration | Linux Today

RootPrompt.org: Using expect for System Administration

Written By
Web Webster
Web Webster
Jul 12, 2000

[ Thanks to Noel
for this link. ]

“Shell scripting is a very common tool used for a system
administrator. Automating every task we can is one of the things
that sets us apart as Unix System Admins. It allows us the time to
work on the important things without staying bogged down in the
minutia of running a system. In this article I will introduce you
the very powerful though unusual scripting language Expect….”

“The part you should pay attention to is “Expect really makes
this stuff trivial.” Expect is an easy way to automate those
tasks you end up doing again and again because they span different
machines or because it requires more interaction than you can get
easily from a bash/c/korn shell script.
It was written by John
Ousterhout and compiles on most if not all Unix machines.”

“Expect is based on tcl, but is very usable without knowing
hardly anything about tcl. Tool Command Language (TCL) was written
as a standard scripting language to be included with utilities so
people would not have to hack together their own languages. As for
myself I have always been amazed that tcl could come out of the
mind of a c programmer and have been glad that I could use expect
without becoming a tcl expert.”

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.