What does -n
in if [ -n "${TEMP_FIL开发者_运维问答E_LIST}" ]
do for this shell script?
From help test
:
-n STRING
STRING True if string is not empty.
-n tests for a non-zero-length string
if [ -n "${TEMP_FILE_LIST}" ]
tests if the argument "${TEMP_FILE_LIST}"
does not have zero length.
You can also check
if [ ! -z "${TEMP_FILE_LIST}" ]
精彩评论