Answer the question
In order to leave comments, you need to log in
Where does the triple from the number 36 disappear?
I have a poltergeist going on here. I don't see an error.
I receive a list of UIDs of letters from the mailbox via IMAP using CURL, which I am going to process further:
#!/bin/bash
#ставлю англ. локаль чтобы date выдал <b>Feb</b> вместо <b>Фев</b>
LANG=en_US.utf8
DATE_STRING=`date +"01-%h-%Y"`
#отрезаю из ответа IMAP первые 9 символов из строки ( * SEARCH 2 3 4 10 20 34 35 36)
MAIL_LIST_CMD=`curl -s "imap://me%40site.ru:[email protected]/INBOX?SINCE%2001-feb-2020%20from%20abon.site.ru" | cut -c 9-`
2 3 4 10 20 34 35 36
for i in $MAIL_LIST_CMD
do
echo -e "$i \n"
done
2
3
4
10
20
34
35
6
MAIL_LIST_CMD="$MAIL_LIST_CMD 37 38"
2
3
4
10
20
34
35
6
37
38
echo $(($i+1-1))
2
3
4
10
20
34
35
+1-1»)ошибка синтаксиса: недопустимый математический оператор (неверный маркер «
Answer the question
In order to leave comments, you need to log in
the problem was solved like this:
MAIL_LIST_CMD=`echo -e "$MAIL_LIST_CMD" | tr -d '\r\n'`
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question