I'm working in Mac OSX, so I guess I'm using bash...?Sometimes I enter something that I don't want to be remembered in the history. How do I remove it?
How to remove a single line from history?
bash;shell;command line;command history
Preventative measuresIf you want to run a command without saving it in history, prepend it with an extra spaceprompt$ echo savedprompt$  echo not saved \> #     ^ extra spaceFor this to work you need either ignorespace or ignoreboth in HISTCONTROL.  For example, runHISTCONTROL=ignorespaceTo make this setting persistent, put it in your .bashrc.Post-mortem clean-upIf you've already run the command, and want to remove it from history, first usehistoryto display the list of commands in your history.  Find the number next to the one you want to delete (e.g. 1234) and run history -d 1234