News for hackers. Stuff that matters.
Re:Shell programming with bash: by example, by counter-example by minimax on Monday January 13, 2014 @03:26PM (#7053038)
Modern Bash (a.k.a. the bash you get with Linux but not with OS X) even has associative arrays similar to what you would call a dict in Python or a hash in Perl.

    $ declare -A capitals
    $ capitals["Illinois"]="Springfield"
    $ capitals["California"]="Sacramento"
    $ echo ${capitals["California"]}
    Sacramento
    $ echo ${capitals["Illinois"]}
    Springfield
    $ for k in ${!capitals[@]} ; do
    >     echo "The capital of $k is ${capitals[$k]}"
    > done
    The capital of Illinois is Springfield
    The capital of California is Sacramento
Re:Shell programming with bash: by example, by counter-example by gislifb on Monday January 13, 2014 @07:13PM (#7054531)
Nice, never knew about this. Cheers