this post was submitted on 24 Jul 2026
431 points (99.5% liked)

Programmer Humor

32452 readers
1709 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] OwOarchist@pawb.social 3 points 17 hours ago (1 children)

Or just include the trailing slash in $STEAMROOT, so that if the variable is empty, it will evaluate to rm -rf "" and do nothing.

[โ€“] victorz@lemmy.world 4 points 16 hours ago

That seems like a more error-prone solution than the shell option. That would make it evaluate to rm -rf * which would probably delete your home directory, I'm guessing. And also put the burden of knowing the slash needs to be included on something completely disconnected from the expression. Nah, don't do it like that.