TCL-201: Tcl/Expect Programming
Overview:
This three-day programming class provides programmers the knowledge to create Tcl/TK scripts. Students will develop experience to automate system tasks via hands-on programming exercises in conjunction with the lecture.
Prerequisites:
Prior to attending this class, students should have the following experience:
- Programming experience in a structured language (C, C++, Java, Cobol) is required.
Objectives:
Upon successful completion of this course, students should be able to:
- Use scalar, list and array variables.
- Manipulate strings.
- Use regular expressions to search for and replace sub-strings within a string.
- Use flow control statements such as if, while, switch, for and foreach.
- Create and use procedures including handling the scope of variables.
- Control the file system and processes from within a Tcl script.
- Use Expect to automate scripts.
- Send processed data with the send command.
- Receive data from processes with the expect command.
- Handle multiple processes with Expect.
Modules:
- Introduction to Tcl/Tk
- Tcl Basics
- Variables
- Lists
- Arrays
- Strings
- Regular expressions
- Flow control
- Procedures
- File & Processing Handling
- Introduction to Expect
- Using the send command
- Using the expect command
- Using globs and regular expressions with Expect
- Processing handling
- Handling user input and controlling output