gravar Bash_history imediatamente
shopt -s histappend
PROMPT_COMMAND="history -a;$PROMPT_COMMAND"
Better Bison
shopt -s histappend
PROMPT_COMMAND="history -a;$PROMPT_COMMAND"