Bash history

Clear history and write to memory

Clear bash history and, if successfull, write (the emptied) history in memory:

history -c && history -w

-c clears the history.
-w writes the history to memory.