12. The Run-Commands File
12.1 Function
Hercules supports the ability to have console commands automatically executed at startup via the 'run-
commands' file. If the run-commands file is found to exist when Hercules starts then each line of the file is
read and interpreted as a console command, exactly as if the command were entered from the HMC sys-
tem console.
The default filename for the run-commands file is "hercules.rc". The default name may be overridden by
setting the "HERCULES_RC" environment variable.
Except for the 'pause' command (see below), each command read from the run-commands file is logged
to the console preceded by a “>”' (greater-than sign) character. Thus you can easily distinguish between
console commands entered from the keyboard from those entered via the run-commands file.
Comment lines starting with '#' are treated as "silent comments" and are thus not logged to the console
whereas comment lines starting with '*' are treated as "loud comments" and will be logged.
12.2 Run-Commands File Statements
There is a number of different types of commands that can be specified within a run-commands file.
These commands are the following:
12.2.1 Hercules Console Commands
Descriptive
herccmd
Diagram
Êʬ¬¬ herccmd ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ÊÍ
In the run-commands file any valid Hercules console command (“herccmd”) can be specified. This in-
cludes the ‘sh’ (shell) command. Each command that is read from the run-commands file is logged to the
console preceded by a ‘>’' (“greater-than” sign) character. This is to distinguish between console com-
mands entered manually from the keyboard from thosecommands entered via the run-commands file.