Don't quote when you want an empty variable to disappear (as distinct from remaining as an empty string):
verbose= [[ some_condition ]] && verbose=-v # ...later... some_program $verbose some_args Don't quote when your variable contains whitespace separated arguments and you want the shell to treat them as separate words
exclude_file= [[ -s excludelist.txt ]] && exclude_file='--exclude excludelist.txt' # ...later... rsync -avP $exclude /path/to/source/ remote:target The general approach is always use double-quote unless you know why you don't want them.The general approach is always to use double-quotes unless you know why you don't want them.