From ce0815c6c9947a00821b48d97f1beafb2943f996 Mon Sep 17 00:00:00 2001 From: papajoker Date: Mon, 27 Feb 2017 00:25:45 +0100 Subject: [PATCH] file in memory --- bin/check-translate.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/check-translate.sh b/bin/check-translate.sh index fb243f2..d590571 100755 --- a/bin/check-translate.sh +++ b/bin/check-translate.sh @@ -3,10 +3,11 @@ fns=($(awk -F'=' '/^_/ {print $1}' "../data/translations/english.trans")) for lg in ../data/translations/*.trans ; do - not=$(grep -cE "#.*translate me" "${lg}") + trans=$(<"${lg}") + not=$(echo "${trans}" | grep -cE "#.*translate me") echo -e "\n-- $(basename "${lg}") ${not} to translate --" for key in "${fns[@]}"; do - if (( $(grep -oEc "^${key}=" "${lg}") != 1)); then + if [[ ! $trans =~ $key ]]; then echo -e "\t${key} not exist" fi done