it works.. but why xD

This commit is contained in:
creme 2020-02-24 16:29:56 +01:00
parent 5d6a3123c2
commit b2c4970381
Signed by: creme
GPG Key ID: C147C3B7FBDF08D0
1 changed files with 4 additions and 2 deletions

View File

@ -146,7 +146,6 @@ EOM
line_to_set["$user_field","$count_field_entry"]+="$user_value"
fi
fi
#done <<< "$(tac "$INFO_FILE")" # read file from buttom
done < "$INFO_FILE"
# add users custom entrys from line_to_set (single lines before arrays)
@ -183,7 +182,10 @@ EOM
cat << EOM >> "$TMP_JSON"
"${line_to_set[$field]}",
EOM
if [ "$field_count" = "${hc_field_entry[$field_name]}" ]; then
echo "$field_count - ${hc_field_entry[$field_name]}"
if [ "$field_count" = "${hc_field_entry[$field_name]}" ] || [ "$field_count" = '0' ]; then
# end of user def. array
# remove trailing ',' on last user entry
unset field_in_progress