Oh man, reading that line made me cringe.
${STEAMROOT:?}
...where :? throws an error if the variable is unset or empty. (Still far too scary for my taste, though!)I generally just prefer not using Bash scripting, as it's very hard to compose functionality in it.
Apparently the "fix" only applies to the root user. The article is about a regular user who recursively lost everything he owned starting at /.
Ouch!
[1] https://unix.stackexchange.com/questions/19547/how-far-can-y...
Thanks, it's was interesting to see the difference!
Recursively removing something that starts with a shell variable is stupid.