Execute command and remove its record from shell's history (bash)
echo 'Secret' > ~/.secret_file; history -d $((HISTCMD-1))
Writes "Secret" to a file and immediately removes its record from the shell's history.
echo 'Secret' > ~/.secret_file; history -d $((HISTCMD-1))
Writes "Secret" to a file and immediately removes its record from the shell's history.