solve .error.txt problem with filename too long with too many tosend errors

This commit is contained in:
qo-op 2021-07-14 00:13:27 +02:00
parent a96c689414
commit 0286fd5e18
1 changed files with 1 additions and 1 deletions

View File

@ -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