Announcement

Collapse
No announcement yet.

GNU Bash 5.1 Released With New "SRANDOM" Variable As A New Means Of Randomness

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    I still use
    Code:
    #!/usr/bin/env sh
    mostly just because I'm too lazy to learn/use the bashisms but I don't knock anyone for using them anymore given the ubiquity of bash. "Portable shell script" is an oxymoron to me

    Comment


    • #22
      Originally posted by dirlewanger88
      arrays seem to be coming to sh in the next POSIX spec.
      OMG, finally! Do you have some news to share?

      As someone who has had to deal with busybox, I agree that most of the bashisms are trivially avoidable, and that arrays, as you mention, is the single exception to that. I call POSIX shell disqualified for purposes of safe shellscripting because of that: Arrays are a necessity for correctness way too often in shellscripting.
      Last edited by andreano; 09 December 2020, 04:37 PM.

      Comment


      • #23
        Originally posted by dirlewanger88

        Shell scripts should be written in POSIX sh, unless there's a reason not to. bash and zsh mostly add interactive features. Even arrays seem to be coming to sh in the next POSIX spec.

        Also, there's nothing "modern" about bash (not that "modern" actually means anything these days).
        Incomming "modern" sh with entire chromium behind as engine.

        Comment

        Working...
        X