• JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    10 hours ago

    When is this a problem? What scripts don’t use a shebang and/or why does using sh call fish instead of bash or dash?

    I have a mild dislike of fish because a few substitutions are different enough that my muscle memory isn’t there. (But I also haven’t put in serious effort to learn them.)

      • JackbyDev@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 hours ago

        Have you run into a specific problem or is this just a hypothetical you’re worried about. I see this a lot but haven’t ever actually run into it being a concern. If you run a script with #!/bin/sh from a Fish shell, it won’t use Fish, it will use whatever you have sh pointing to. (Which shouldn’t be Fish, it’s usually bash or dash.)

        • Mwa@thelemmy.club
          link
          fedilink
          English
          arrow-up
          1
          ·
          5 hours ago

          I ran into issues on fish,i don’t remember what they are but I think it’s no shebang

          • JackbyDev@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 hours ago

            Ah, I see. If you don’t remember, don’t sweat. I’m mostly curious just because posix issues is one of the few complaints I hear but I never see anything specific so I’m extremely curious lol. Please don’t mistake this as one of those fanboyism moments where people try to say something they like is actually perfect and doesn’t have flaws.

            My understanding of shebangs is that it isn’t your shell doing anything fancy with it, it’s your OS (or something, I don’t remember exactly, but it’s lower level than the shell). So maybe something else borked. But I’m no fish expert, I have some error in some fish thing that prints an error every time I open a new shell that I’m too lazy to troubleshoot lol.