I have this:
muh_dir=`cd $(dirname "$BASH_SOURCE") && pwd`
and yeah I tested the above (it has backticks) and it doesn't work well with whitespace in the pwd. On the other hand, this is better:
muh_dir="$(cd $(dirname "$BASH_SOURCE") && pwd)"
My question is - this adds 3 chars to my command the syntax changes in my editor. The first way is much nicer..is there anyway to handle whitespace with the shorter syntax or do I just bite the bullet?
\
cmd``) in *sh shells been deprecated?](https://unix.stackexchange.com/q/126927/135943) – Wildcard Nov 02 '18 at 00:38