Read in password instead of providing an argument
This commit is contained in:
parent
4359dfa302
commit
3e1fcedbb3
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
: '
|
||||
# give password as argument
|
||||
if [ $# -eq 1 ]; then
|
||||
pass=$1
|
||||
@ -11,14 +12,12 @@ else
|
||||
echo "Please only insert one argument"
|
||||
$(exit 1); echo "$?"
|
||||
fi
|
||||
'
|
||||
|
||||
# TODO make this work
|
||||
: '
|
||||
# prompt for password
|
||||
echo -n Password:
|
||||
echo -n "Password: "
|
||||
read -s -r pass
|
||||
echo
|
||||
'
|
||||
|
||||
# go to home dir
|
||||
cd "$HOME"
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
: '
|
||||
# give password as argument
|
||||
if [ $# -eq 1 ]; then
|
||||
pass=$1
|
||||
@ -11,6 +12,12 @@ else
|
||||
echo "Please only insert one argument"
|
||||
$(exit 1); echo "$?"
|
||||
fi
|
||||
'
|
||||
|
||||
# prompt for password
|
||||
echo -n "Password: "
|
||||
read -s -r pass
|
||||
echo
|
||||
|
||||
# go to home dir
|
||||
cd "$HOME"
|
||||
|
Loading…
Reference in New Issue
Block a user