added defaults value and inline read
This commit is contained in:
parent
2c602aaf17
commit
333e5d0ec7
1 changed files with 8 additions and 4 deletions
|
@ -1,7 +1,11 @@
|
|||
echo "Rasplice to Password hyperconverged-cloud enabled integration tool"
|
||||
echo "select minimum word lenght:"
|
||||
read lenght
|
||||
echo "select number for words to integrate:"
|
||||
read words
|
||||
read -p "select minimum word lenght (press ENTER for default = 11): " lenght
|
||||
read -p "select number for words to integrate (press ENTER for default = 4): " words
|
||||
|
||||
lenght=${lenght:-11}
|
||||
#echo $lenght
|
||||
|
||||
words=${words:-4}
|
||||
#echo $words
|
||||
|
||||
curl -s http://rasplice.contaminati.net/sproloquio.txt | grep -e "[^\ ]\{$lenght,\}" | shuf -n $words | sed 's/^\(.\)/\U\1/' | paste -sd ""
|
Loading…
Reference in a new issue