getmail handles 0 mails correctly

This commit is contained in:
Alexander Bocken 2020-09-14 18:04:12 +02:00
parent de494b6c68
commit f1f4794a9f
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -1,3 +1,7 @@
#!/bin/bash
num=$(find ~/.local/share/mail/*/INBOX/new -type f | wc -l)
[ $num != 0 ] && echo "📬"$num
if [ $num != 0 ]; then
echo "📬"$num
else
echo ""
fi