This in my feed today: 5 Modern Bash Scripting Techniques That Only A Few Programmers Know.
Tag Archives: bash
How to write idempotent Bash scripts
This is great: How to write idempotent Bash scripts. Some highlights for me were `blkid` and `mountpoint`.
Shell Functions
Today in #lobsters I was referred to the GNU doco for Shell Functions.
Bash locals
Safer Bash: avoid nesting
Over on Safer Bash: avoid nesting I learned that extracting complex expressions to a named variable is a good idea so as to help catch error conditions.
Cool Bash
Today via lobsters: Cool things I learned about Bash this week.
Modulinos In Bash
Via Hacker News today: Modulinos In Bash. “A modulino is a file which behaves like a library when it is imported, and like a script when executed.”
The Bourne shell and Bash aren’t the right languages for larger programs
Today I read The Bourne shell and Bash aren’t the right languages for larger programs. It linked to this DKMS script which was interesting. TIL: ‘readonly’ in BASH.
Elegant bash conditionals
Some discussion concerning Elegant bash conditionals. Personally I use both forms, variously.
Easiest guide to .bashrc
An intro to bash: Easiest guide to .bashrc. I particularly liked this one:
var() { eval "export $1=\"$2\"" }
Dangerous, but cool.