add if loop

This commit is contained in:
onceupon 2018-12-19 17:59:27 +08:00 committed by GitHub
parent 934f793da8
commit 89c34e4347
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -899,6 +899,10 @@ else
echo >&2 "Fatal error. This script requires mydir." echo >&2 "Fatal error. This script requires mydir."
fi fi
# if variable is null
if [ ! -s "myvariable" ]
#True of the length if "STRING" is zero.
# Test if file exist # Test if file exist
if [ -e 'filename' ] if [ -e 'filename' ]
then then