=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... nts to p and d so that we skip the root directory itself -- which must be "special cased" since it appears to be a "null" entry if we do it the other way. The same problem would have occurr... .
The vanishing of a program is a rare event: if it's there when we look for it, probably it will be there also a few moments later when we in... Y.
A test on the variable is then carried out. If it holds any value then it's an error, but if it holds no value then it's OK. A return code is then executed based on thi
one detects whether the string is null.
# However it is good practice to quote it (if [ "$string1" ]).
#
# As Stephane Chazelas poi... # Again, gives correct result.
# Still, it is better to quote it ("$string1"), because . . .
string1="a = b"
if... ^^^ False condition. So, why "true" output?
# Is it because both condition clauses within brackets ev... true 1>&2`" ]] # (no output)
# No, that's not it.
# Apparently && and || "short-circuit" while -a