HP-UX Reference (11i v1 00/12) - 1M System Administration Commands N-Z (vol 4)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1m/naaagt.1m
________________________________________________________________
___ ___
o
opx25(1M) opx25(1M)
NAME
opx25 - execute HALGOL programs
SYNOPSIS
/usr/lbin/uucp/X25/opx25 [-f scriptname ][-c char][-ofile-descriptor][-ifile-descriptor]
[-nstring ][-d ][-v ]
DESCRIPTION
HALGOL is a simple language for communicating with devices such as modems and X.25 PADs. It has
simple statements similar to send xxx and expect yyy that are described below.
Options:
opx25 recognizes the following options:
-f script Causes opx25 to read script as the input program. If -f is not specified, opx25
reads the standard input as a script.
-c char Causes opx25 to use char as the first character in the input stream instead of actu-
ally reading it from the input descriptor. This is useful sometimes when the program
that calls opx25 is forced to read a character but then cannot ‘‘unread’’ it.
-o number Causes opx25 to use number for the output file descriptor (i.e., the device to use for
send). The default is 1.
-i number Causes opx25 to use ’number for the input file descriptor (ie, the device to use for
’expect’). The default is 0.
-n string Causes opx25 to save this string for use when \# is encountered in a send com-
mand.
-d Causes opx25 to turn on debugging mode.
-v Causes opx25 to turn on verbose mode.
An opx25 script file contains lines of the following types:
(empty) Empty lines are ignored.
/ Lines beginning with a slash (/) are ignored (comments)
ID ID denotes a label, and is limited to alphanumerics or
_.
send string string must be surrounded by double quotes. The text is sent to the device specified
by the -o option. Non-printable characters are represented as in C; i.e., as \DDD,
where DDD is the octal ascii character code. \# in a send string is the string that fol-
lowed the -n option.
break Send a break "character" to the device.
expect number string
Here number is how many seconds to wait before giving up. 0 means wait forever, but
this is not advised. Whenever string appears in the input within the time allotted, the
command succeeds. Thus, it is not necessary to specify the entire string. For exam-
ple, if you know that the PAD will send several lines followed by an @
prompt, you
could just use
@ as the string.
run program args
The program (sleep, date, etc.) is run with the args specified. Do not use quotes
here. Also, the program is invoked directly (using execp), so wild cards, redirection,
etc. are not possible.
error ID If the most recent expect or run encountered an error, go to the label ID.
exec program args
Similar to run, but does not fork.
echo string Similar to send, but goes to standard error instead of to the device.
set debug Sets the program in debug mode. It echoes each line to /tmp/opx25.log, as well
as giving the result of each expect and run. This can be useful for writing new scripts.
The command set nodebug disablesthis feature.
HP-UX Release 11i: December 2000 1 Section 1M611
___
___