I remember a book I read in elementary school (in the Cam Jansen series, IIRC) where the main conflict was a mean older brother put a password on the new family computer (a huge deal in the early 90s), and the younger hires the kid detective to find the password. The password is “hot dog”, ultimately determined because the desktop BG was a picture of ketchup and mustard.
I recall being not super satisfied with that ending.
Putting aside the "should/shouldn't do" argument, I was also wondering if the code is even viable. I imagine that 'ls' and 'sudo' are probably pretty ubiquitous, but I bet there exist some Linux installs out there with a different shell than 'bash', and some might not have 'grep' too. That would lead to some pretty cryptic bugs for the end user, eh?