Community Page
- www.tech-recipes.com/ Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Please dont remove this Folder, It occupies only 315 MB and is useful for your Office 2003.... SRIKANTH
- that still wont work and i got no idea about registery could use help
- Thanx for help
- Thought I would have to get out my regestry editor, should have checked the settings first XD.
- thanks! it's very helpful.
Tech-Recipes
Cookbook of Tech TutorialsHide password entry in Bourne/bash shell script | Bourne shell scripting | Tech-Recipes
Started by qdideas · 9 months ago
4 years ago
read -s secret
4 years ago
3 years ago
trap "stty echo ; exit" 1 2 15
stty -echo
read password
stty echo
trap "" 1 2 15
If the user press Ctrl+C in the password prompt, the normal stty mode will be restored
3 years ago
Q
3 years ago
use closing redirection in the stty command:
stty -echo >&- 2>&-
This helps to avoid obsolete "No terminal" message in the scripts.