Turns out I never made such a video but I thought I did at the time of recording this one. I'll make one soon. For now the TL;DR is it's mainly for consistency's sake. If you ever want to supply a default or index an array you need the braces. It's also handy to avoid being confused on how something might be parsed, putting the braces around the variable removes all confusion at a glance.
@@fuseteam Turns out I briefly mentioned it in a related blog post from 3 years ago about quoting your variables at nickjanetakis.com/blog/here-is-why-you-should-quote-your-variables-in-bash. There's a tiny paragraph near the end about braces. I'll still make a video about braces in general tho since it deserves its own dedicated video and post with more examples and details.
Hey! Great video 😃
thanks for the great video
No problem, thanks for watching.
thanx a lot!
Thank you for this video. Is it possible to use envsubst wtih a JSON file? I am in the process of changing a value for a key in a JSON file.
No problem, yes it works with any file type.
could you link the video surrounding the convention of using braces in your variables?
Turns out I never made such a video but I thought I did at the time of recording this one. I'll make one soon.
For now the TL;DR is it's mainly for consistency's sake. If you ever want to supply a default or index an array you need the braces. It's also handy to avoid being confused on how something might be parsed, putting the braces around the variable removes all confusion at a glance.
@@NickJanetakis ah cool thanks
@@fuseteam Turns out I briefly mentioned it in a related blog post from 3 years ago about quoting your variables at nickjanetakis.com/blog/here-is-why-you-should-quote-your-variables-in-bash. There's a tiny paragraph near the end about braces.
I'll still make a video about braces in general tho since it deserves its own dedicated video and post with more examples and details.
TL;DR - Its a templating engine for stuff that doesn't have that out of the box and your template variables are env variables.