I recently had to execute a command that I did not want the shell to save in its history.
After a little searching, I finally understood what this little variable
HISTCONTROL does. Definitely seen it around, never bothered with it; one of those things.
As long as it is set to either
ignorespace, anything starting with a space will not be saved to history.
echo "Hello world!"
The command will still execute as normal, but that extra space makes a difference. Continue reading with an authoritative article on LinuxJournal.com from 2009.
Thanks to rzg for pointing out the