58
submitted 8 months ago by yogthos@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] roadrunner_ex@lemmy.ca 16 points 8 months ago

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?

[-] SteveTech@programming.dev 16 points 8 months ago

I might be wrong, but I believe Debian ships without sudo, only su by default (or at least if you configure a root password in the setup).

[-] N0x0n@lemmy.ml 11 points 8 months ago* (last edited 8 months ago)

You're right ! And I really should get used to how debian works with su.

But with docker it's very convenient to add an user in the docker groupe with sudo :/

[-] SteveTech@programming.dev 6 points 8 months ago

And I really should get used to how debian works with su.

I only know because installing sudo is usually the very first thing I do whenever I have to install it haha.

[-] const_void@lemmy.ml 13 points 8 months ago

I bet there exist some Linux installs out there with a different shell than 'bash',

100%. Alpine is one such distro.

[-] eutampieri@feddit.it 7 points 8 months ago

Also, doas instead of sudo

[-] backhdlp@iusearchlinux.fyi 2 points 8 months ago

Iirc Void too.

[-] yogthos@lemmy.ml 6 points 8 months ago

That code is a crime against nature and humanity.

[-] zea_64@lemmy.blahaj.zone 4 points 8 months ago

I believe POSIX mandates grep and a shell that should be able to handle everything this code uses, but sudo is a problem

[-] MangoPenguin@lemmy.blahaj.zone 1 points 8 months ago

Debian doesn't come with sudo and it's always annoying running into stuff that has it hardcoded (or just added by default to a command)

this post was submitted on 06 Mar 2024
58 points (92.6% liked)

Programmer Humor

32558 readers
589 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS