3 ms·
Nobody used it with the quotes. The point was to get rid of the quotes. [ x$var = xval ]
by rurban 2y ago
Nobody used it with the quotes. The point was to get rid of the quotes.
[ x$var = xval ]
- PhilipRoman 2y agoIt does nothing to help with quoting, if $var is broken then so is x$var. About half the usages I've found (and this is some pretty old code) quote the variables correctly.
- hi-v-rocknroll 2y agoThe assumption for this use was var was a valid single word but could conflict with switches to [ / test or it could be the empty string. If var was already guaranteed to be [^[:space:][:punct:][:cntrl:]]+, then x would also have been unnecessary too.
- throwaway314155 2y agoThis is discussed in the article.
- rurban 2y agoNot at all. And even our autotools are still full of x-hacks without double quotes. He completely missed the point of the x-hack. Which obviously fails with spaces.
- chasil 2y agoIf we have set var='hello world' then the syntax breaks.