Use -e to read
Which use readline for interactive read command (allow to do control-a/e and such). Change-Id: I143d6f14dd7e853197f2e30909d4f7b33262351a
This commit is contained in:
parent
d7326d2ea9
commit
c9d9851bf3
2
stack.sh
2
stack.sh
@ -214,7 +214,7 @@ function read_password {
|
|||||||
echo "It is probably best to avoid spaces and weird characters."
|
echo "It is probably best to avoid spaces and weird characters."
|
||||||
echo "If you leave this blank, a random default value will be used."
|
echo "If you leave this blank, a random default value will be used."
|
||||||
echo "Enter a password now:"
|
echo "Enter a password now:"
|
||||||
read $var
|
read -e $var
|
||||||
pw=${!var}
|
pw=${!var}
|
||||||
if [ ! $pw ]; then
|
if [ ! $pw ]; then
|
||||||
pw=`openssl rand -hex 10`
|
pw=`openssl rand -hex 10`
|
||||||
|
Loading…
Reference in New Issue
Block a user