Is there a key that explains theese letters such as -n
, -d
, etc all mean ?
Example:
if [[ -d ${directory_name} ]]; then ...; fi
What is the -d
or where do I find a key?
Example:
while [[ -n ${variable_name} ]]; do ...; done
what is the -n
mean??
Is there a guide that explains what all of these -n
, -e
, -a
, -d
, -s
, -h
, etc?
I do a lot of Unix shell scripting modifications, and I've seen these arguments used inside the loops or if then statements on variables and file locations etc.
I'm looking for a place that explains each of the arguments as mentioned above for scripting.
zsh
man test
, depending on your OS/distro (only if your shell is not providing a built-intest
).