3 ms·
Excellent article. The quick summary ([1]) is particulary good. Note that quoting variable names is a good idea for other reasons, e.g., when a variable unexpe
by PeterWhittaker 12y ago
Excellent article. The quick summary ([1]) is particulary good.
Note that quoting variable names is a good idea for other reasons, e.g., when a variable unexpectedly ends up empty: Not quoting such a variable can lead to termination in calls to test ([ ]), e.g., because the empty variable is replace with nothing (so that test sees the next non-whitespace token instead of the expected variable value, empty or otherwise), while quoting will at least cause the shell to correctly replace the variable with an empty string.
[1] http://www.dwheeler.com/essays/filenames-in-shell.html#summary http://www.dwheeler.com/essays/filenames-in-shell.html#summa...