opx25.1m (2010 09)

o
opx25(1M) opx25(1M)
(TO BE OBSOLETED)
NAME
opx25 - execute HALGOL programs
SYNOPSIS
/usr/lbin/uucp/X25/opx25
[
-f scriptname ][-c char ][-ofile-descriptor ][
-ifile-descriptor ]
[
-nstring ][-d ][
-v ]
DESCRIPTION
The
uucp commands, including opx25, are targeted for removal from HP-UX; see the WARNINGS
below.
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 pro-
gram 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
followed 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 allot-
ted, the command succeeds. Thus, it is not necessary to specify the entire string.
For example, 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, redirec-
tion, 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
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)