EO - execute on (a file).

Syntax:

EO [Filename=]file "command" ["command"]* [option]*
(+|-)Stop (+)            (+|-)Verbose (-)
Filename=file            Parameter=character (#)
"command"

Examples:

eo list parameter=% "acce mc /cat all/%1/ v"
eo f=args p=& -verbose -stop 'acce rf &1' 'acce rc &2'

Options:

-Stop
continues execution even if an error occurs. Pressing BREAK while a breakable subsystem is executing (e.g. L or P) is considered an error.
+Verbose
displays the commands on the terminal as they are being executed.
-Verbose
executes commands without displaying them.
Parameter=character
changes the parameter character from the default "#" to "character". The "character" must be a single character and may only be specified once.
"command" ["command"]*
are the command strings EO will work on. They must be enclosed in quotes (single or double).
Filename=file
is a file full of arguments that are substituted into the specified command lines. Only one file may be specified. If no file is specified, EO uses the standard input. The string "Filename=" is optional; you only need to specify the file name if you wish.

Description:

EO works as a companion to EXEC. It takes a file of arguments and executes the given command string(s) for each line in the file. Each #N (1 <= N <= 9) in the command string is replaced by the N'th argument from the line. For each line in "file", the arguments are inserted into the entire series of commands and then the commands are sent to the system in succession. For example, suppose "filelist" is a text file where each line consists of a single file name.

eo filelist "shrink #1" "len #1"

performs the SHRINK command, then the LEN command, on each file named in "filelist".

In the command strings on the EO command line, every occurrence of "#" by itself is considered an error and every occurrence of "##" is replaced by a "#". The default parameter character ("#") mysteriously vanishes when EO is executed from inside a CRUN (or a DRUN); thus it is advisable to use the Parameter=character option in these cases.

If EO detects a bad return status for any command, EO stops all execution unless you specify the -Stop option. A program is considered to return a "bad status" if the program aborts, is terminated by a break, executes a DRL T.ERR, or if user switch bits 18-26 are all turned on when the program terminates. A B program that exits with "exit(-1)" turns on bits 18-26.

If the standard input for EO is the terminal, EO prompts you for input with a colon. EO parses any line you type in just as if it had been given to EO in a file. If you type an exclamation point at the beginning of the line, EO sends the line to the system instead of processed it normally; the use of "!" only works when EO is taking your input from the terminal. To show the end of input when you are typing it in from a terminal, enter a null line (just press ENTER in response to the ":" prompt).

See Also:

expl exec

expl b lib exit

Copyright © 1996, Thinkage Ltd.