‘Well it’s only passing mv a list of–’ yeah yeah yeah, I know, and that’s why I’m calling bullshit. It should be massively harder to execute filenames. Even if 1970s decisions make that the eternal hideous default: the lack of any idiot-proof standard workaround is incomprehensible.

StackOverflow’s full of competing one-liners and people pointing out how each one is considered harmful. The least-skeezy options use exec. That sentence should make anyone recoil in horror.

This is not a filename problem. This is a tool problem. If a single printable character is going to silently expand into a list of names, then for god’s sake, having it put each name in quotes should be fucking trivial.

  • @mindbleachOP
    link
    14 months ago

    I’ve been using command-line programs for twenty-five years. “Basic” is not the issue, here. This is obscene edge-case behavior for what honestly should be a Hello World level example.

    Thoroughly explicable causes do not make the outcome any less of a problem.

    • @[email protected]
      link
      fedilink
      14 months ago

      I’ve been using command-line programs for twenty-five years.

      A general statement (not about you):

      I’ve been using my human body for over 25 years (exact number withheld) and still don’t know shit about how it works and what it does. I don’t even know the muscle groups, which most people who care about their health learn. But I still use them. Years of experience don’t always translate to understanding and knowledge.

      More specifically about you (and me): I’m sure you know a lot about how to use the shell, and I’ll absolutely bet you know more tricks than me to get shit done. But you still didn’t know about the quoting thing. I have a tendency to dig into understanding how shit works while not developing my actual skills in using them. You might have the opposite tendency. The best is somewhere in the middle, I think.