COHERENT manpages

This page displays the COHERENT manpage for fc [Edit and re-execute one or more previous commands].

List of available manpages
Index


fc -- Command

Edit and re-execute one or more previous commands
fc [-e editor] [-ln] [first [last]]

fc, the  ``fix command'', is  a command built  into the Korn  shell ksh. It
permits you  to edit  and re-execute  one or more  commands that  have been
executed previously.

fc selects commands first through last and inserts them into a text editor.
You  can edit  the commands  in  the editor;  exiting from  the editor  re-
executes  the commands.   first and  last  can be  addressed either  by the
command's number (the first command issued  to the shell is number one, the
second is number two, and so on), or by a string that matches the beginning
of the  command.  When called without a last  variable, the command selects
just first.  Option -l  prints the commands  on the standard  output rather
than  buffering  the  commands for  editing  and  re-execution.  Option  -n
suppresses the default command numbers.

fc  uses the  editor named  in the environmental  variable FCEDIT;  if this
variable is  not set, it  uses MicroEMACS.  The  option -e lets  you select
another editor.

See Also

commands,
FCEDIT,
ksh