| Start |
|---|
Quick Reference Interaction with the historyEvent designatorsWord designatorsThese are separated by ModifiersThese modify the preceding event or word designator. If the Bash variable |
Repeat previous command with sudo |
| Search in the command history by pattern Press controlr and type a pattern. For example, if you recently executed The ``cr'` there is the string I typed so far. This is an incremental search, so as you continue typing, the search result gets updated to match the most recent command that contained the pattern. Press the left or right arrow keys to edit the matched command before running it, or the enter key to run the command. By default the search finds the most recently executed command matching the pattern. To go further back in the history press controlr again. You may press it repeatedly until you find the desired command. |
Switch to newly created directory with !#:N This will substitute the Nth argument of the current command. In the example |
| Using !$ You can use the You can also build upon the repetition Notice that in the last example we did not get |
Repeat the previous command with a substitution This command will replace If you want to replace all occurrences, you have to use |
Read Article
https://develop.horje.com/learn/1434/reference