I came across some article regarding dictionary array for bash 4. I wanted to try it out but I am currently running bash 3.2 in Mac OSX Maverick. I came across this article on how to use homebrew to upgrade to bash 4 and ran into a few problems.
First, after I run
brew install bash
I got an error saying there is a permission error for /usr/local/share/info. I changed the owner of the folder to me and rerun the linking process.
sudo chown $(whoami) /usr/local/share/info brew link bash
Everything seems to be working. Now I following the article and add /usr/local/bin/bash to /etc/shells and run chsh -s /usr/local/bin/bash (see link below). So I check my bash version to see what happen.
bash --version GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin13) Copyright (C) 2007 Free Software Foundation, Inc.
Ok. What is going on? I went and changed the Terminal Preference in Shells open with: Command (complete path) to /usr/local/bin/bash under Startup and still have the old version. Here I suspect that when I run the version check, I am not checking what the version open by the terminal but the /bin/bash version. Finally, I found out that there is an environment variable BASH_VERSION that I can check for the current bash environment that I am running.
echo $BASH_VERSION 4.3.18(1)-release
Bingo. It works. I changed my preference back to Default login shell and still give me the update version.