Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shell (bash) non-empty string test works without -n #20

Open
GoogleCodeExporter opened this issue May 13, 2015 · 1 comment
Open

shell (bash) non-empty string test works without -n #20

GoogleCodeExporter opened this issue May 13, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

The following warning is wrong:
https://code.google.com/p/google-styleguide/source/browse/trunk/shell.xml?r=112#
716

[[ "${my_var}" ]] is, when quoted, always exactly the same as [[ -n "${my_var}" 
]] regardless of my_var contents, as far I've tested. Even with [ builtin. Can 
you provide a counterexample?

Original issue reported on code.google.com by [email protected] on 9 Nov 2013 at 3:37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant