=word}
If varname exists and isn't null, return its value; otherwise set it to word and then return its value.[7]
Purpose:
Setting a variable to a d... thname as argument and returns the filename only; it is meant to be used with the shell's command substitution mechanism (see below). basename is less efficient than ${variable##/*} because it runs in its own separate process rather than within the shell. Another utility, dirname(1), does essentially the opposite of basename: it returns the directory prefix only. It is equivalent to the Korn shell ex
^^^ False condition. So, why "true" output?
# Is it because both condition clauses within brackets evaluate?
[[ 1 -eq 2 && -n "`echo true 1>&2`" ]] # (no output)
# No, that's not it.
# Apparently && and || "short-circuit" while -a and -o do not.
</code>