

zsh doesn't do this by default, so it's ( usually) safe to leave the double-quotes off. The overall goal of the LDP is to collaborate in all of the issues of Linux documentation. Script that counts the number of even numbers inside an array in JavaScript. The important thing with double-quoting variables is that it prevents the variable's value from being split into multiple words and/or wildcard-expanded into a list of matching filenames, both of which can cause chaos. The Linux Documentation Project is working towards developing free, high quality documentation for the Linux operating system. A non-numeric string converts to NaN which is always false. What quoting does is change how the characters within the quoted section are parsed. So, for example, is false because "05" is not the same string as "5", but is true because "05" and "5" both parse out to the same number. In, they're converted to numbers and the numbers are compared. In the case of a test, the strings are just compared directly.


In the shell, pretty much everything is fundamentally a string but if you use it in a context where a number is needed, the shell will try to parse that string into a number and use that (and then if there's a numeric result, it'll convert the result into a string for storage/display/whatever). Shell syntax works very differently from what you're used to.
