What I learnt: $(...)
is nested execution
Questions: Do I need to put double quotation marks for $(expression)
to check that string is empty or not? if it is a variable, we do not need (-z "$var")
, we can just use (-z $var)
right? What if the string generated is an expression?
for example, if I want to check whether the string is empty or not, (-z $(expression))
, do I need double-quotes for $(expression)
(seems to work fine but just want to make sure)