El día Sunday, December 04, 2016 a las 09:06:18AM -0500, Jude DaShiell escribió:
> You might be able to use a little expect in that script to catch and
> handle mutt's no mail case when that happens.
The last two lines in the terminal were the script is running say:
---Mutt: imap://imap.1blu.de/INBOX
[Msgs:0]---(mailbox-order/date)--------------------------(all)---
No hay mensajes.
('No hay mensajes' is Spanish for 'No mails').
How could I catch this in the script and send 'push q'? Can you please
point me to some place in mutt's manual or some examples.
Thanks
mutt -n -f imap://imap.1blu.de/ \
-e "set sort=mailbox-order; set confirmappend=no; set delete=yes; push
'<tag-pattern>.<enter><tag-prefix><save-message>/usr/home/guru/mailboxtmp<enter><sync-mailbox><exit>'"
I have added at the end:
... <sync-mailbox><exit>'; push q"
and it seems to do the trick.
matthias
--
Matthias Apitz, ✉ [email protected], ⌂ http://www.unixarea.de/ ☎
+49-176-38902045
No to the €! Out of this imperialistic EU! Out of the imperialistic NATO war
alliance!
¡No al €! ¡Fuera de esta UE imperialista! ¡Fuera de esta OTAN imperialista!
N€IN zum €! Raus aus dieser imperialistischen EU! Raus aus dieser
imperialistischen NATO!