News for hackers. Stuff that matters.
Re:Bug 1202858 – Restarting squid results in deleting all fi... by emmelaich on Tuesday March 24, 2015 @08:05AM (#9256056)
I think a better alternative is something like

    rm -r "${VAR:-var_is_not_set_so_please_fix_this_script}"
which substitutes the var_is_... if VAR is not set.

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.

Re:Bug 1202858 – Restarting squid results in deleting all fi... by rjcz on Tuesday March 24, 2015 @09:49AM (#9256496)
No, this will remove 'var_is_not_set_so_please_fix_this_script' file if one exists.

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}
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3...
Re:Bug 1202858 – Restarting squid results in deleting all fi... by emmelaich on Tuesday March 24, 2015 @06:46PM (#9260062)
Yep, better. Thanks.