From 0286fd5e18259b093bf75c09b49b0da462405898 Mon Sep 17 00:00:00 2001 From: qo-op Date: Wed, 14 Jul 2021 00:13:27 +0200 Subject: [PATCH] solve .error.txt problem with filename too long with too many tosend errors --- sms_send_tosend.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sms_send_tosend.sh b/sms_send_tosend.sh index f899665..cd77a25 100755 --- a/sms_send_tosend.sh +++ b/sms_send_tosend.sh @@ -32,7 +32,7 @@ for tosend in /home/${YOU}/.zen/SMS/PHONE/*/*.error.txt; do ## PREPARE SMS cat "${tosend}" | sed "s/_PHONE_/${phone}/g" | sed "s/_ID_/${xzuid}/g" > /tmp/tosend.sh && chmod +x /tmp/tosend.sh ## SEND SMS & ARCHIVE RESULT (error?) - bash -x /tmp/tosend.sh && mv ${tosend} ${tosend}.txt && rm /tmp/tosend.sh || mv ${tosend} ${tosend}.error.txt + bash -x /tmp/tosend.sh && mv ${tosend} ${tosend}.txt && rm /tmp/tosend.sh || tosend=$(echo ${tosend} | sed 's/\.error\.txt//g') && mv ${tosend} ${tosend}.error.txt sleep 3 done