Bash: Caret Substitution

Sample command:
echo "dev" && echo "my dev"

Replace "dev" with "prod":
^dev^prod

Previous command will now be this:
echo "prod" && echo "my dev"

To replace all occurences of "dev":
^dev^prod^:&

Previous command will now be this:
echo "prod" && echo "my prod"

Comments