News for hackers. Stuff that matters.
Re:Bash Pitfalls by jonahx on Tuesday September 08, 2020 @12:05PM (#24409739)
Here is shellcheck compliant solution which uses no external utilities, and is explicit about our intention:

    # function to imitate "nix --version" since I don't have it installed
    nixv() {
      echo 'nix (Nix) 2.3.4'
    }

    read -ra arr < <(nixv)

    echo "${arr[2]}"

There are no comments on this comment yet.