What does the -z
flag mean in the code below:
if [ -z $TEST_PARAM ]; then
And is there a list of such flags?
For a flag like ls -l
, I know where to find it, but for a single flag, I didn't get any website describes it.
shell-scripttest
What does the -z
flag mean in the code below:
if [ -z $TEST_PARAM ]; then
And is there a list of such flags?
For a flag like ls -l
, I know where to find it, but for a single flag, I didn't get any website describes it.
Best Answer
-z STRING
means:You can see a list of all of these with
man test
.[
is an alias for thetest
command, although usually implemented by your shell in practice. You probably have a/bin/[
, though. All of these-X
tests are options totest
.