MPE/iX Shell and Utilities Reference Manual, Vol 1

fc(1) MPE/iX Shell and Utilities fc(1)
(b) If the command specifier is a negative number n, fc edits the command that came n
commands before the current command.
(c) If the command specifier is a string, fc edits the most recent command beginning with
that string.
When you use the first form of the SYNOPSIS to edit a command, you can omit either last or
both first and last. If you omit last, fc edits the single command specified by first. If you
omit both, fc edits the previous command that you entered to the shell.
Options
fc accepts the following options:
–e editor
invokes editor to edit the commands. If you do not specify the –e option, fc assumes
that the environment variable
FCEDIT
, if defined, contains the name of the editor for
fc to use. If
FCEDIT
is not defined, fc invokes ed(1) to edit the commands.
–l simply displays the command list. This option does not edit or re-enter the com-
mands. If you omit last with this option, fc displays all commands from the one
indicated by first through to the previous command entered. If you omit both first
and last, fc displays the 16 most recently entered commands.
–n suppresses command numbers when displaying commands.
–r reverses the order of the commands in the command range.
–s re-enters exactly one command without going through an editor. If a command
specifier is given, fc selects the command to re-enter as described earlier; otherwise,
fc uses the last command entered. To perform a simple substitution on the command
before re-entry, use a parameter of the form
old=new
The string new replaces the first occurrence of string old. fc displays the (possibly
modified) command before re-entering it.
ENVIRONMENT VARIABLES
fc uses the following environment variables:
FCEDIT
contains the default editor to be used if none is specified with the –e option. If this
variable is unset or null, fc uses ed to edit commands.
HISTFILE
contains the path name of the history file.
Commands and Utilities 1-225