
Here's Why You Should Quote Your Variables in Bash - nickjj
https://nickjanetakis.com/blog/here-is-why-you-should-quote-your-variables-in-bash
======
LinuxBender
This is one of the many things that would be called out if you run your shell
script through shellcheck [1] source [2]

[1] - [https://www.shellcheck.net/](https://www.shellcheck.net/)

[2] -
[https://github.com/koalaman/shellcheck](https://github.com/koalaman/shellcheck)

Shellcheck is also in several yum repos such as EPEL and in homebrew for Mac.

You can add a comment in your script to exclude / ignore specific warnings.
Examples are in the man page.

~~~
nickjj
Yep, I use Shellcheck in VSCode with [https://github.com/timonwong/vscode-
shellcheck](https://github.com/timonwong/vscode-shellcheck).

But it won't save you if you're on a server executing raw commands so it's
still good to know about the concerns of omitting quotes.

