
fc | 665
Bash and Korn
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Options
-f Names refer to functions; the functions are exported in the
environment. Bash only.
-n Remove the named variables or functions from the environ-
ment. Bash only.
-p Print export before printing the names and values of exported
variables. This allows saving a list of exported variables for
rereading later.
Example
In the original Bourne shell, you would type:
TERM=vt100
export TERM
In Bash and the Korn shell, you could type this instead:
export TERM=vt100
false
false
ksh88 alias for let 0. Built-in command in Bash and ksh93 that
exits with a false return value.
fc
fc [options] [first [last]]
fc -e - [old=new] [command]
fc -s [old=new] [command]
ksh88 and Bash. Display or edit commands in the history list. (Use
only one of -e, -l or -s.) first and last are numbers or strings speci-
fying the range of commands to display or edit. If last is omitted, fc
applies to a single command (specified by first). If both first and
last are omitted, fc edits the previous command or lists the last 16.
The second form of fc takes a history command, replaces old with
new, and executes the modified command. If no strings are speci-
fied, command is just reexecuted. If no command is given either, the
previous command is reexecuted. command is a number or string
like first. See the examples ...