Merge pull request #40 from dhxgit/master

Fix Issue #39 : read used without -r
This commit is contained in:
Rasmus Steinke 2016-05-24 22:57:02 +02:00
commit 0d6f2882ed

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}