Browse Source

wordstring

master
Christian Rotzoll 6 years ago
parent
commit
817add4965
  1. 23
      home.admin/70initLND.sh

23
home.admin/70initLND.sh

@ -208,29 +208,28 @@ if [ ${walletExists} -eq 0 ]; then
if [ "${CHOICE}" == "SEED_SCB" ]; then if [ "${CHOICE}" == "SEED_SCB" ]; then
echo "ENTER SEED"
# dialog to enter # dialog to enter
#$_temp="/home/admin/.seed.tmp" #$_temp="/home/admin/.seed.tmp"
dialog --backtitle "RaspiBlitz - LND Recover" --inputbox "Please enter/paste the SEED WORD LIST:\n(just the words, seperated by commas, in correct order as numbered)" 9 78 wordstring=$(dialog --backtitle "RaspiBlitz - LND Recover" --inputbox "Please enter/paste the SEED WORD LIST:\n(just the words, seperated by commas, in correct order as numbered)" 9 78)
#wordstring=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' ) #wordstring=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' )
#shred $_temp #shred $_temp
#echo "processing ..." #echo "processing ..."
# remove spaces # remove spaces
#wordstring=$(echo "${wordstring}" | sed 's/[^a-zA-Z0-9 ]//g') wordstring=$(echo "${wordstring}" | sed 's/[^a-zA-Z0-9 ]//g')
# string to array # string to array
#IFS=',' read -r -a seedArray <<< "$wordstring" IFS=',' read -r -a seedArray <<< "$wordstring"
# check array # check array
#if [ ${#seedArray[@]} -eq 24 ]; then if [ ${#seedArray[@]} -eq 24 ]; then
# echo "OK - 24 words" echo "OK - 24 words"
# exit 1 exit 1
#else else
# echo "wrong number of words" echo "wrong number of words"
# wordstring="" wordstring=""
# exit 1 exit 1
#fi fi
fi fi

Loading…
Cancel
Save