More Things I Wish I’d Known About Bash
zwischenzugs.com
More Things I Wish I’d Known About Bash
1–10 of 50 posts
Re: More Things I Wish I’d Known About Bash
#2Previous post discussion: https://news.ycombinator.com/item?id=16084763
Re: More Things I Wish I’d Known About Bash
#3I'm so happy that Bash is getting the love it deserves.
Re: More Things I Wish I’d Known About Bash
#4I'm so happy that Bash is getting the love it deserves.
Me too!
Re: More Things I Wish I’d Known About Bash
#5Sigh. Hit ‘up’, ‘left’ until at the ‘p’ and type ‘e’ and return.
One could also use , and to achieve the same result much quicker.
Re: More Things I Wish I’d Known About Bash
#6Sigh. Hit ‘up’, ‘left’ until at the ‘p’ and type ‘e’ and return. One could also use , and to achieve the same result much quicker.
True, I use that too, but gets trickier in the middle of the line.
Re: More Things I Wish I’d Known About Bash
#7Sigh. Hit ‘up’, ‘left’ until at the ‘p’ and type ‘e’ and return. One could also use , and to achieve the same result much quicker.
Yup. The moment you need editing capabilities more sophisticated than those three keys, though, I recommend switching to vi input mode (set -o vi) if you are familiar with vim keybindings. Although tapping Esc is not as quick as Ctrl (or, my chosen alternative, Ctrl-[), you have an entire library of editing commands already at your beck and call. I find that using 'f' or 'F' and '.' more quickly triangulates the problem area of the text in most cases.
Of course, if you are an emacs user, more power to you with the emacs bindings.
Re: More Things I Wish I’d Known About Bash
#8I imagine most uses of random in Bash don't need to be that robust, but it might be worth mentioning that ${RANDOM}${RANDOM} has a lot of bias as a random number generator.
Re: More Things I Wish I’d Known About Bash
#9Well that first example with the mistyped grep command just blew my mind.
Re: More Things I Wish I’d Known About Bash
#10Portuguese speakers have counted for a long time with this gem, simply the best Bash doc/cheat sheet I've ever seen on the web. This is probably my oldest bookmark still relevant after 15 years.
It's in portuguese and I'm not sure if there's an official translation, yet it's easy enough to decipher if you know bash, and Google Translate will do a pretty decent job.
I gift you "Aurelio's Swiss Army Knife of the Bash Shell" - http://aurelio.net/shell/canivete/