drerun
Restarts processes
Format:
drerun [ cmd_args ][ in_operation infile ]
[ out_operations outfile ]
[ error_operations errfile ]
Arguments:
cmd_args
The arguments to be used for restarting a process.
operations
The in_operation, out_operations, and error_operations are discussed in the Description section.
infile
If specified, indicates a file from which the launched processes will read information.
outfile
If specified, indicates the file into which the launched processes will write information.
errfile
If specified, indicates the file into which the launched processes will write error information.
Description:
The drerun command restarts the process that is in the current focus set from its beginning. The drerun command uses the arguments stored in the ARGS and ARGS_DEFAULT state variables. These are set every time the process is run with different arguments. Consequently, if you do not specify the arguments to be used when restarting the process, the CLI uses the arguments specified when the process was previously run. (See drun for more information.)
The dererun command differs from the drun command in that
- If you do not specify an argument, drerun uses the default values. In contrast, the drun command clears the argument list for the program. This means that you cannot use an empty argument list with the drerun command to tell the CLI to restart a process and expect that no arguments will be used.
- If the process already exists, drun will not restart it. (If you must use the drun command, you must first kill the process.) In contrast, the drerun command will kill and then restart the process.
The arguments to this command are similar to the arguments used in the Bourne shell.
The in_operation is follows:
< infile
Reads from infile instead of stdin.
The out_operations are as follows:
> outfile
Sends output to outfile instead of stdout.
>& outfile
Sends output and error messages to outfile instead of stdout and stderr.
>>& outfile
Appends output and error messages to outfile.
>> outfile
Appends output to outfile.
The error_operations are:
2> errfile
Sends error messages to errfile instead of stderr.
2>>errfile
Appends error messages to errfile.
Command alias:
You may find the following alias useful:
Alias |
Definition |
Meaning |
rr |
{drerun} |
Restarts processes |
Examples:
drerun
Reruns the current process. Because arguments are not used, the process is restarted using its previous values.
rr -firstArg an_argument -aSecondArg a_second_argument
Reruns the current process. The default arguments are not used because replacement arguments are specified.