News for hackers. Stuff that matters.
Re:Zsh is your friend. by kruhft on Tuesday January 31, 2012 @12:20PM (#3534170)
I reccommend ksh over bash. That's all I use these days. It was sh done right, although it does have a bit of history to it for compatibility.

To use associative arrays in ksh:

  typeset -A table
  column="name"
  table[$column]="value"
  echo ${table[$column]}
ksh is much more decent than bash, although I reccommend using in an emacs M-x shell buffer for better command line editing.

Edit: forgot to dereference column when setting value in table.

Re:Zsh is your friend. by _seininn on Tuesday January 31, 2012 @12:48PM (#3534312)
For reference, to use associative arrays in Bash:

  declare -A table
  column="name"
  table[$column]="value"
Included in recent versions of bash :)
Re:Zsh is your friend. by kruhft on Tuesday January 31, 2012 @01:11PM (#3534408)
I say typeset, you say declare, let's call the whole thing off! :)