Disable logging to bash history temporarily

30. October 2009

1 Kommentar

Set the HISTFILE environment variable. This is useful when experimenting with real passwords in bash. May not be recommended anyway.

export HISTFILE=/dev/null

¬ written by gimi in Uncategorized

Suppress echo in bash scripts

1. October 2009

0 Kommentare

The code allowing to enter passphrases in scripts.

stty_orig=`stty -g`
stty -echo
read secret
stty $stty_orig

pure copy of http://www.tech-recipes.com/rx/278/hide-password-entry-in-bournebash-shell-script/

¬ written by gimi in Uncategorized

Based on a theme by BenediktRB • Top left picture from piqs.de, cc-by • Thanks for donating spare CPU cycles. explain • Powered by WordpressRSS Feed