You know how there are weird tricks with computer stuff that you think everyone knows but they don't? I live learning and teaching new things like those when they come up.
Today's was the carat substitution in bash. It probably works in other shells too but IDK, I'm too old to learn a new shell.
The way it works is fairly similar to the / in sed or similar. You can use them to run the previous command but with a string substitution.
For example, let's say I entered this command:
dig A cascadiacrow.org
When it fails to resolve, I realize it was a .com domain. Rather than retyping the command, or hitting the up arrow to change the previous command, you could do this:
^org^com^
And it would run:
dig A cascadiacrow.com
Kind of cool with those one liners you spend way too much time on and find a typo.
Anyway, I used it and someone thought it was magic so if it's new to you too, happy Monday.
R.L. Dane 🍵
in reply to Jonathan Lamothe • • •I had a similar dream four years ago.
Went back to my old church, was glad to see a few people I really loved again.
Stayed for a couple months, but it had really devolved into a cult.
Noped out of there when the pastor invited people to come up to the front to receive healing and repent for taking the COVID vaccine.
🤦🏻♂️
Jonathan Lamothe likes this.