Exploring Expect (Nutshell Handbooks) by Don Libes

Exploring Expect (Nutshell Handbooks) by Don Libes

By Don Libes

Anticipate is readily changing into part of each UNIX user's toolbox. It helps you to automate Telnet, FTP, passwd, rlogin, and countless numbers of alternative functions that often require human interplay. utilizing count on to automate those functions will let you accelerate projects and, in lots of circumstances, remedy new difficulties that you simply by no means could have even thought of sooner than. for instance, you should use anticipate to check interactive courses without alterations to their interfaces. Or wrap interactive courses with Motif-like front-ends to manage purposes via buttons, scrollbars, and different image parts with out recompilation of the unique courses. you do not even want the resource code! anticipate works with distant purposes, too. Use it to tie jointly net functions together with Telnet, Archie, FTP, Gopher, and Mosaic. Don Libes is the author of count on in addition to the writer of this booklet. In Exploring anticipate, he presents a entire educational on all of Expect's beneficial properties, permitting you to place it instantly to paintings in your difficulties. In a down-to-earth and funny sort, he presents various examples of hard real-world purposes and the way they are often computerized utilizing anticipate to save lots of you time and cash. count on is the 1st of a brand new breed of courses in keeping with Tcl, the software Command Language that's rocking the pc technology group. This ebook presents an advent to Tcl and describes how count on applies Tcl's energy to the hot box of interplay automation. even if your curiosity is in count on or interplay automation otherwise you easily are looking to know about Tcl and spot the way it has been utilized in genuine software program, you will discover Exploring anticipate a treasure trove of easy-to-understand and priceless details.

Show description

Read or Download Exploring Expect (Nutshell Handbooks) PDF

Best unix books

Kylix Developer's Guide

Delphi for Linux (Kylix) improvement contains 3 major topics. First, the e-book well-known that a lot of its viewers could be home windows builders who have to comprehend simple Linux improvement techniques, so there'll be details during the e-book delivering perception on how you can leverage home windows improvement wisdom to the Linux platform.

Just Enough Unix

Barely enough UNIX offers a short and cheap advent to the UNIX working process. the second one variation of this article will mirror alterations and updates to the UNIX curriculum that experience taken position because the book's unique e-book.

Signposts in Cyberspace: The Domain Name System And Internet Navigation

The area identify process (DNS) permits effortless alphanumeric names and domains to be assigned to websites. a lot of those names have received monetary, social, and political worth, resulting in conflicts over their possession, particularly names containing trademarked phrases. Congress, in P. L. 105-305, directed the dept of trade to request the NRC to accomplish a research of those matters.

Mac OS X Tiger: Missing Manual

You could set your watch to it: once Apple comes out with one other model of Mac OS X, David Pogue hits the streets with one other meticulous lacking guide to hide it with a wealth of aspect. the hot Mac OS X 10. four, larger referred to as Tiger, is quicker than its predecessors, yet nothing's too quick for Pogue and Mac OS X: The lacking handbook.

Additional resources for Exploring Expect (Nutshell Handbooks)

Example text

The following fails: expr {$name == Don} Unquoted strings are not permitted inside expressions to prevent ambiguities in interpretation. But strings in expressions can still be tricky. In fact, I recommend avoiding expr for these implicit string operations. The reason is that expr tries to interpret strings as numbers. Only if they are not numbers, are they treated as uninterpreted strings. Consider: tclsh>if {"0x0" == "0"} {puts equal} equal Strings which are not even internally representable as numbers can cause problems: tclsh> expr {$x=="1E500"} floating-point value too large to represent while executing "expr {$x=="1E500"}" On page 46, I will describe the "string compare" operation which is a better way of comparing arbitrary strings.

While $a {incr a} while {$a} {incr a} It does not hurt to write braces around all expressions; however, if you frequently read other people's code, you must get used to seeing the braces omitted in some expressions. 5. The switch Command The switch command is similar to the if command but is more specialized. Instead of evaluating a mathematical expression, the switch command compares a string to a set of patterns. Each pattern is also associated with a body of Tcl commands. The first pattern that matches has its associated body evaluated.

87). The regexp command provides more powerful patterns. I will describe regexp in Chapter 5 (p. 107). The first operation searches for a string (first argument) in another string (second argument). It returns the first position in the second argument where the first argument is found. -1 is returned if the second string does not contain the first. net" 0 The last operation returns the last position where the first argument is found. net" 6 The length operation returns the number of characters in the string.

Download PDF sample

Rated 4.74 of 5 – based on 18 votes
Comments are closed.