One minute
Fix Previous Shell Command Using fc
Suppose you have entered a long, multiline command wrong.
By typing fc
in the shell of your choice (this command is present in most of the popular shells), an editor will open
with the previous command, where you can edit it quickly. After saving the file and closing the editor,
the corrected command will be executed.
Note: you need to have your $EDITOR
variable set.
Read other posts
comments powered by Disqus