meaning of if [ -z $SOMETHING....] in bash shell
Hi,
I have the following in a bash script file if [ -z "$SOMETHING" ] I have searched for the -z option for an hour in Bash References, every other option is covered except for '-z' I assume this means is $SOMETHING defined in the environment but can anyone give me a definitive answer. |
I applaud you searching around but "man test" is what you're looking for (string with length zero).
|
I never would have guessed 'man test', but surprised I couldn't google for if [ -z,
thanks for the help. |
To google it you'd prob need single quote marks around that.
|
"man [" would have worked too.
|
And people wonder why *nux is considered not newbie friendly ...
For the greater proportion of the human race, that is just too arcane. |
Quote:
|
Quote:
http://www.tldp.org/LDP/abs/html/testconstructs.html |
Quote:
|
All times are GMT -5. The time now is 04:17 AM. |