Under Construction

Das Kommando fc

Das Kommando fc erlaubt das Anzeigen, Ändern und Ausführen von einem oder mehreren Kommandos aus der History. Ein Teil der Funktionalität ist ähnlich zum Kommando history. Beim Ändern und Ausführen zurückliegender Kommandos besitzt fc aber einige Möglichkeiten, die das Kommando history nicht bietet.

Das Kommando fc bietet die folgenden Optionen und Argumente:

[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
    string.

    Options:
      -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 ~]$