Bash: Caret Substitution
Sample command:
Replace "dev" with "prod":
Previous command will now be this:
To replace all occurences of "dev":
Previous command will now be this:
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
Post a Comment