Double quotes and command substitution in shell language
I was really surprised that a rather large amount of online tutorials or comments post code similar to this: dir=$(dirname $0) or dir=$(dirname $(readlink -f $0)). On the surface, this code looks good,…