hide command from bash history code example
Example 1: show bash history
history # show all
history | tail -5 # show last 5
history | grep text # search for text
Example 2: bash history delete entry
Just check the enumeration of your commands history and then delete them:
history -d 7 #Deletes seventh command in your history list