From 72ae8997f4c2e877d0b92034c20fef50d57fa442 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Jun 2007 11:41:46 +0200 Subject: [PATCH] Suche neue maildirs, template --- suche_neue_mails_maildir.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 suche_neue_mails_maildir.sh diff --git a/suche_neue_mails_maildir.sh b/suche_neue_mails_maildir.sh new file mode 100755 index 0000000..1761b30 --- /dev/null +++ b/suche_neue_mails_maildir.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 06-Jun-2007 +# Last Modified: - +# Description: Search for new mailboxes (and later display them via dialog) +# + +basedir=~/Maildir +tmp=$(mktemp /tmp/$(basename $0).XXXXXXXXXXXX) + +find "$basedir" -name new -type d > "$tmp" + +while read dir; do + is_new=$(ls "${dir}" | head -n1) + if [ "$is_new" ]; then + echo "New in $dir" + fi +done < "$tmp" + +rm -f "$tmp"