rm -r "${VAR:-var_is_not_set_so_please_fix_this_script}"
BTW, I hate hate hate -f. It has two meanings: 1. 'force' the removal 2. ignore any error
I've seen an instance of this sort of bug in my sysadmin career that I remember. It was a Solaris patch which wiped a chunk of the system.
If you're suggesting using parameter expansion, at least suggest the correct one (i.e. one that will give a meaningful error message):
${parameter:?word}
BTW, I hate hate hate -f. It has two meanings: 1. 'force' the removal 2. ignore any error
I've seen an instance of this sort of bug in my sysadmin career that I remember. It was a Solaris patch which wiped a chunk of the system.