shopt -s histappend # append to history, don't overwrite it
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
http://askubuntu.com/questions/67283/is-it-possible-to-make-writing-to-bash-history-immediate
http://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows