how to have bash save comand history
Just note for myself as a bash learner.
187 export HISTSIZE=1000
188 shopt -s histappend
bash usually keeps command history in memory and doesn't flash them out to a history file as default. set histappend enables it. Please search /histappend in man BASH(1) for more info.