Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
ACC Utilities Reference Guide > Chapter 4 ZTERM - Interactive Routine Interface

Running ZTERM from a Command File

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

ZTERM may also be run from a command file to allow frequently used command sequences to be executed more conveniently. To invoke this mode and to pass the name of the command file, enter the file name as the second parameter after ZTERM:

$ zterm <filename>

For example, the file /tmp/test1.cmd may contain the following commands:

* Set this copy of zterm as receiver for ZLUs 1 to 8
rc 1 8
* Transmit 2 100-byte messages to terminals 1 to 8
tx 1 100 0 2
tx 2 100 0 2
tx 3 100 0 2
tx 4 100 0 2
tx 5 100 0 2
tx 6 100 0 2
tx 7 100 0 2
tx 8 100 0 2
* Exit ZTERM at the end of the commands
ex

This command file would be executed by entering:

$ zterm /tmp/test1.cmd

Note that the last command in the file is ex to cause ZTERM to terminate once the commands have been completed. If the ex is omitted ZTERM will return to the interactive mode at the end of the command list.

ZTERM writes its output to standard out, which may be redirected to a file if required. Using the previous command file as an example, the output can be redirected to the file /tmp/test1.list with the following command:

$ zterm /tmp/test1.cmd > /tmp/test1.list

Note that when ZTERM is reading its commands from a file it displays the command immediately before the output form the command. If the output is also redirected to a file these commands will appear in the output file (compare this to redirected output from interactive commands where the commands do not appear in the output file).

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.