MPE/iX Shell and Utilities Reference Manual, Vol 2
r(1) MPE/iX Shell and Utilities r(1)
NAME
r — edit and re-execute previous command
SYNOPSIS
r [old=new][specifier]
DESCRIPTION
The r command re-executes a command you ran previously, possibly editing the command
first. Commands are obtained from your command history file; see fc(1) and sh(1) for more
details.
The specifier tells which command you want to re-execute. It can have any of the following
forms:
An unsigned number
r run the command with that number.
A negative number –n
r runs the command that came n commands before the current one.
A character string
r runs the most recent command beginning with that string.
If no specifier is given, r runs the most recent command.
The old=new feature lets you edit a command before running it. old and new must be charac-
ter strings. r replaces the first occurrence of old with new and then re-executes the command.
EXAMPLES
rcp
runs the most recent command beginning with the characters cp. The cp could be the whole
command name or it could be part of a longer command name (for example, cpio).
cp file1 /dir
r 1=2
r 2=3
This is equivalent to
cp file1 /dir
cp file2 /dir
cp file3 /dir
Commands and Utilities 1-453