News for hackers. Stuff that matters.
Re:Pure Sh Bible by singron on Sunday April 30, 2023 @10:24PM (#35768491)
In bash, you can use `declare -n`. E.g.

    var=world
    declare -n tmp="hello_$var"
    tmp=value
    printf '%s\n' "$hello_world" # value
I highly recommend this pattern if you want to emulate jagged 2d arrays or other nested data structures in bash for some reason.

There are no comments on this comment yet.