Under Construction

The Command fc

The fc command allows one or more commands from the history to be displayed, modified and executed. Some of the functionality is similar to the history command. When changing and executing previous commands, however, fc has a number of options that the history command does not offer.

The fc command offers the following options and arguments:

[user01@aixe01 ~]$ help fc
fc: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
    Display or execute commands from the history list.

    fc is used to list or edit and re-execute commands from the history list.
    FIRST and LAST can be numbers specifying the range, or FIRST can be a
    string, which means the most recent command beginning with that

      -e ENAME  select which editor to use.  Default is FCEDIT, then EDITOR,
                then vi
      -l        list lines instead of editing
      -n        omit line numbers when listing
      -r        reverse the order of the lines (newest listed first)

    With the `fc -s [pat=rep ...] [command]' format, COMMAND is
    re-executed after the substitution OLD=NEW is performed.

    A useful alias to use with this is r='fc -s', so that typing `r cc'
    runs the last command beginning with `cc' and typing `r' re-executes
    the last command.

    Exit Status:
    Returns success or status of executed command; non-zero if an error occurs.
[user01@aixe01 ~]$