I was wonder with someone can help me:
if [ -z $1 ]; then
user=$(whoami)
else
if [ ! -d "/home/$1" ]; then
echo "Requested $1 user home directory doesn't exist."
exit 1
fi
user=$1
fi
I was studying some bash commands when I saw two commands: -z and -d. I know what they do (first check for blank variable and the second check for existence directory). My question is how I can find descriptions about these commands (i.g man page -d/-z). They can be only used with if-else statement?
man bashhelp test.help testis a summary for conditional expression![syntax...