blank.gif (43 bytes)

Church Of The
Swimming Elephant

Index | Description | Usage | Options | Variables | Hints | Bulletproof

exp_version [[-exit] version]
Arguments Significance
-exit Expect prints an error and exits if the version is out of date
version Specify a required version of Expect.

The exp_version command is useful for assuring that the script is compatible with the current version of Expect.

With no arguments, the current version of Expect is returned.  This version may then be encoded in your script.  If you actually know that you are not using features of recent versions, you can specify an earlier version.

Versions consist of three numbers separated by dots.  First is the major number.  Scripts written for versions of Expect with a different major number will almost certainly not work.  exp_version returns an error if the major numbers do not match.

Second is the minor number.  Scripts written for a version with a greater minor number than the current version may depend upon some new feature and might not run.  exp_version returns an error if the major numbers match, but the script minor number is greater than that of the running Expect.
Third is a number that plays no part in the version comparison.  However, it is incremented when the Expect software distribution is changed in any way, such as by additional documentation or optimization.  It is reset to 0 upon each new minor version.

With the -exit flag, Expect prints an error and exits if the version is out of date.

This material is excerpted from the O'Reilly book "Exploring Expect" by Don Libes, and can also be found in the manpage on many UNIX platforms.



Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

Have you gone to church today?
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609