Fix Issue #39 : read used without -r

This commit is contained in:
Dominik Hannen 2016-05-24 22:54:22 +02:00
parent b88bb64072
commit b9025da7a8

View File

@ -201,7 +201,7 @@ ${line3}</span>"
password_temp=$(PASSWORD_STORE_DIR="${root}" pass "$selected_password") password_temp=$(PASSWORD_STORE_DIR="${root}" pass "$selected_password")
password=$(echo "${password_temp}" | head -1) password=$(echo "${password_temp}" | head -1)
declare -A stuff declare -A stuff
while read LINE; do while read -r LINE; do
_id=$(echo -e "${LINE}" | gawk -F ':[[:space:]]*' '{print $1}') _id=$(echo -e "${LINE}" | gawk -F ':[[:space:]]*' '{print $1}')
_val=$(echo -e "${LINE}" | gawk '{sub(/:/,"")}{for (i=2; i<NF; i++) printf $i " "; print $NF}') _val=$(echo -e "${LINE}" | gawk '{sub(/:/,"")}{for (i=2; i<NF; i++) printf $i " "; print $NF}')
stuff["${_id}"]=${_val} stuff["${_id}"]=${_val}
@ -297,7 +297,7 @@ showEntry () {
password=$(echo "${password_temp}" | head -1) password=$(echo "${password_temp}" | head -1)
declare -A stuff declare -A stuff
while read LINE; do while read -r LINE; do
_id=$(echo -e "${LINE}" | gawk -F ':[[:space:]]*' '{print $1}') _id=$(echo -e "${LINE}" | gawk -F ':[[:space:]]*' '{print $1}')
_val=$(echo -e "${LINE}" | gawk '{sub(/:/,"")}{for (i=2; i<NF; i++) printf $i " "; print $NF}') _val=$(echo -e "${LINE}" | gawk '{sub(/:/,"")}{for (i=2; i<NF; i++) printf $i " "; print $NF}')
stuff["${_id}"]=${_val} stuff["${_id}"]=${_val}