diff --git a/townandmail.sh b/townandmail.sh index da2ae8e..559cbac 100755 --- a/townandmail.sh +++ b/townandmail.sh @@ -35,7 +35,7 @@ umask=077 -PROGRAMM_NAME=`basename $0` +PROGRAMM_NAME=$(basename $0) DEBUG=0 VERBOSITY=0 NEW_GS=0 @@ -154,9 +154,9 @@ msg_start "Try to match postalcode and townname with community key ... " while IFS=, read -r ort plz mail; do gs=$(grep "$plz" $GS_FILE | grep ",$ort," | cut -d ',' -f 3) if [ -z "$gs" ] ; then - FAILS=$(expr $FAILS + 1) + FAILS=$(( FAILS + 1 )) else - MATCH=$(expr $MATCH + 1) + MATCH=$(( MATCH + 1 )) echo "$gs,$mail" >>$GS_MAIL fi echo "$plz,$ort,$mail" >>$TMP_OUT @@ -180,16 +180,16 @@ while IFS=, read -r ort plz ; do if [ -z "$resp" ] ; then gs=$(grep "$plz" $GS_FILE | grep ",$ort," | cut -d ',' -f 3) if [ -z "$gs" ] ; then - FAILS=$(expr $FAILS + 1) + FAILS=$(( FAILS + 1 )) echo "$plz,$ort,cant get community key" >>$FALLOUT else mail=$(grep "$gs" $GS_MAIL | cut -d ',' -f 2) if [ -z $mail ] ; then - FAILS=$(expr $FAILS + 1) + FAILS=$(( FAILS + 1 )) echo "$plz,$ort,cant get email for $gs" >>$FALLOUT else echo "$plz,$ort,$mail" >>$TMP_OUT - MATCH=$(expr $MATCH + 1) + MATCH=$(( MATCH + 1 )) fi fi fi