LinuxCommandLibrary

^

Bash builtin to quick substitute a string in the previous command and run the result.

TLDR

Run the previous command replacing string1 with string2

$ ^[string1]^[string2]
copy


Remove string1 from the previous command
$ ^[string1]^
copy


Replace string1 with string2 in the previous command and add string3 to its end
$ ^[string1]^[string2]^[string3]
copy

Copied to clipboard