chap 2 TCL-Introduction and Overview
Expression:
set x "the answer is 1 + 3"
set y "the answer is [1 + 3]" ; #wrong, 1 is not a command
set y "the answer is [expr 1 + 3]"
=====================
Source command:
source ~/def.tcl; #if the file include the procedure, it is callable.
=====================
file I/O
set file [open /tmp/stuff w]
puts -nonewline $file "Hello World"
++++++++++++++++++++++++++++++++++++++
Chap 3 Getting started with Expect
Once expect has matched data to a pattern, it moves the data to the expect_out array.
the matched data is no longer eligible to be matched.
set timeout 60; #by default, expect only wait for 10 sec
=======================
interact command
Expect provides a command that turn control from the script over to u.
++++++++++++++++++++++++++++++++++++++++++
Chap 4 Glob patterns and other Basic
Monday, May 4, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment