diff options
-rwxr-xr-x | localkannel-dispatch | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/localkannel-dispatch b/localkannel-dispatch index 00f7f5c..d034f53 100755 --- a/localkannel-dispatch +++ b/localkannel-dispatch @@ -240,7 +240,9 @@ and (if included) send MSG to subscribers." ;; esac # FIXME: Avoid hardcoding national prefix - while targetphone="$(echo "$1" | perl -pe 's/^(?=[^+])/+36/;' -e '/^\+\d+$/ or exit 1;')"; do + while [ -n "$1" ]; do + targetphone="$(echo "$1" | perl -pe 's/^(?=[^+])/+36/;' -e '/^\+\d+$/;')" + [ -n "$targetphone" ] || continue targetphones="${targetphones:+$targetphones }$targetphone" shift |