Timeline for How to determine if a bash variable is empty?
Current License: CC BY-SA 3.0
2 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 9, 2011 at 19:15 | comment | added | James Sneeringer |
There's a comment about the alternative to -z at pubs.opengroup.org/onlinepubs/009695399/utilities/test.html. Basically, it isn't meant to be an alternative to -z . Rather, it handles cases where $foo could expand to something beginning with a metacharacter that [ or test would be confused by. Putting an arbitrary non-metacharacter at the beginning eliminates that possibility.
|
|
Oct 20, 2011 at 3:58 | history | answered | curious_prism | CC BY-SA 3.0 |