- Mechanism for "one-button installs" from central server
- Simultaneously supports multiple system configurations and OS versions
- Extensible to allow automatic local customizations
Saturday, November 22, 2008
What is Jumpstart?
Friday, November 21, 2008
How to read password from bash script.
i wrote a bash script to read the username and password of the user through the terminal.
read -p "Username: " uname
read -p "Password: " pass;
But normally the terminal will display all text that we enter in to it. So i got the output below.
Username: aneesh
Password: CAPSLOCK
I want to avoid password being displayed. So I modified the above script as below.
ead -p "Username: " uname
stty -echo
read -p "Password: " pass;
echo
stty echo
echo " The entered username and password are $uname and $pass"
Now it works fine..
read -p "Username: " uname
read -p "Password: " pass;
But normally the terminal will display all text that we enter in to it. So i got the output below.
Username: aneesh
Password: CAPSLOCK
I want to avoid password being displayed. So I modified the above script as below.
ead -p "Username: " uname
stty -echo
read -p "Password: " pass;
echo
stty echo
echo " The entered username and password are $uname and $pass"
Now it works fine..
Subscribe to:
Posts (Atom)