You may use shellcheck with correct shebang to learn what holds for your shell. Some things here depend on using a recent version of Bash / zsh and are not portable shell scripting. This is not saying "all wrong!", but just do not believe in silver bullets.
starts off with "why you should always quote your variable" proceeds to not quote a single variable yes i know twas the focus was on showcases the usefulness of braces, the quotes would've gotten in the way xD
Plot twist: Inside of a heredoc you don't need to quote variables because they're effectively quoted by the heredoc. Try it out. Quoting them literally outputs the quotes around the variable.
Superb video ... using {} on ALL variables and suddenly my coding efforts work a lot more often 👍
Really helpful and thoroughly explained! Thanks, mate!
I really like the way you present information!
Thanks a lot.
Just excellent! I have nothing to add, all cases are here.
Thanks. I'm sure there's other more obscure Bash features that require braces too, but in my day to day the ones I included are what I tend to hit.
@@NickJanetakis it is also worth mentioning why it's always a good idea to put bash variables in qoutes
@@nnutipa Yep, check the blog post at the start of the video (in the description).
cool this explains a lot, i didn't know you could do all that with bash variables xD
You may use shellcheck with correct shebang to learn what holds for your shell. Some things here depend on using a recent version of Bash / zsh and are not portable shell scripting. This is not saying "all wrong!", but just do not believe in silver bullets.
starts off with "why you should always quote your variable"
proceeds to not quote a single variable
yes i know twas the focus was on showcases the usefulness of braces, the quotes would've gotten in the way xD
Plot twist: Inside of a heredoc you don't need to quote variables because they're effectively quoted by the heredoc.
Try it out. Quoting them literally outputs the quotes around the variable.
@@NickJanetakis haha sneaky! that's quite an interesting feature