Under Construction

The bash History Expansion

The history expansion is performed immediately after reading the entire input line, even before the shell splits the input into individual words. A desired history expansion is introduced by the history expansion character “!“. You can access a complete command from the history, or just parts (one or more words/arguments) of a command. In addition, you can modify the selected command before executing it again. In the following, all these possibilities are presented and demonstrated using a few simple examples.