Fc (Unix)

 is a standard program on Unix and Unix-like operating systems that lists, edits and reexecutes commands previously entered to an interactive shell. "fc" is a builtin command in the Bash and Zsh shells and is an initialism for "fix command". It is particularly helpful for editing complex, multi-line commands. The editor can be specified by setting the "EDITOR" (changes the default editor) or the "FCEDIT" environment variable.
Examples.
Flag codice_1 used to list previous command history, with example showing command codice_2 as item 1001 in the user's history. 
$ fc -l
1001 ls
Flag codice_3 with this index would then recall the history command from 1001:
$ fc -s 1001
ls
Though more powerfully, codice_3 enables inline substitution.
$ ls floder
[user typo]
$ fc -s ^floder^folder^
ls folder
[Command revised and runs with correction]
Most powerfully, executing fc on its own "edits" the last command executed. Editor can be specified on command line (-e) or via environment variable FCEDIT. User is thus able to fully modify the last command executed via the editor, upon exiting will execute the resultant command. 
$ fc
[Change 'ls' to 'ls -la' in editor and exit]
ls -la