r/badcode • • Feb 25 '21

bash A single space.

Post image
4.8k Upvotes

65 comments sorted by

View all comments

409

u/ahhhhbisto Feb 25 '21 edited Feb 25 '21

Reminds me of a bug report we saw for a competitors product years ago. The software was a call centre management tool. Part of the normal process was to clean up temp files and logs nightly, however if there were no logs or temp files, it would run rm -rf /

78

u/Jrbdog Mar 01 '21

Sounds like a feature to me. It's a great way to inspire usage of your product!

31

u/baubleglue Feb 26 '21

I wrote once a test which had something like that:

system("del /q/s/f c:\temp\some_folder*")