On 07/17/2013 04:01 PM, sebb wrote:
May I suggest a short comment is added to the script to document why -z and -n are not used? Someone else reading the script in the future is going to wonder the same-z and -n
Some shells do not work well if variable is not set when using -z and -n. In case FOO was not set at all they break, but work if FOO="" as expected. Anyhow, IMHO 'if [ ".$FOO" != . ]' is more readable then 'if [ -n "$FOO" ]' I always end wondering if I should use -z or -n :) Regards -- ^TM --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org