How does one properly quote an argument for a command that can contain spaces?
For example:
parent_dir = "$(basename $dir)"
How to quote $dir here? What if it contains spaces or other special characters?That's what I dislike about Bash.
Also, always start your scripts with
set -e
This prevents script from running after error, without any messages though.Also, I always make mistakes when using [ and [[.