• roadrunner_ex@lemmy.ca
    link
    fedilink
    English
    arrow-up
    16
    ·
    10 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
      link
      fedilink
      English
      arrow-up
      16
      ·
      10 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
        link
        fedilink
        arrow-up
        11
        ·
        edit-2
        10 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
          link
          fedilink
          English
          arrow-up
          6
          ·
          10 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
      link
      fedilink
      arrow-up
      13
      ·
      10 months ago

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

      100%. Alpine is one such distro.

    • zea@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      4
      ·
      10 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
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 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)

  • espresso_con_panna
    link
    fedilink
    arrow-up
    5
    ·
    10 months ago

    geez I tried my best not to be stereotypical, but…I am a flawed human being and I searched for their linkedin profile, it suddenly all checks out

      • espresso_con_panna
        link
        fedilink
        arrow-up
        1
        ·
        10 months ago

        I don’t like being cryptic at all, but “free speech” doesn’t always include discriminatory ones. And being flawed, I can’t stop my brain from generating those thoughts, so I just tried to be a slightly friendlier a*hole. Otherwise I could have said: PhD, yeah of course, so many of them are so used to writing shitty code without peer reviews for so long, that totally checks out. And Indian…again. well, no wonder.

        • Tartas1995@discuss.tchncs.de
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          10 months ago

          Yeah that’s a stereotype. Some many brilliant people and somehow the fuck ups (not the people but their fuck ups) generate all the attention. I didn’t think of that stereotype and was curious. But seriously blaming a (maybe even a fresh)PhD for being bad at coding is both fair and unfair but no peer review is not on them.