Caret
Bash builtin to quick substitute a string in the previous command and run the result.
Equivalent to !!:s^string1^string2.
More information: https://gnu.org/software/bash/manual/bash.html#Event-Designators.
- Run the previous command replacing
string1withstring2:
^string1^string2
- Remove
string1from the previous command:
^string1^
- Replace
string1withstring2in the previous command and addstring3to its end:
^string1^string2^string3
- Replace all occurrences of
string1:
^string1^string2^:&