Am 2005-04-06 20:59:37, schrieb Andreas Pakulat:
> Hi,
>
> bin ja nun nicht sooo der Bash-Crack, deswegen erlaube ich mal hier
> nach Hilfe zu fragen. Folgendes Konstrukt generiert mir meine
> Mailbox-Liste für Mutt und ich würd das gerne beschleunigen. Das
> Problem dürfte die while-Schleife sein (mutt ist schneller beim
> starten wenn ich das rausnehme):
>
>
> mailboxes = `find $HOME/.Mail \
> -type d \
> -name "cur" \
> -maxdepth 2 \
> -printf "=%P\n" \
> | sed -e "s&/cur$&&" \
> -e "s/ /\\\ /g" \
> -e 's&^\(.*\)$&"\1"&' \
> | while read f; do \
> if [[ $( echo $f | egrep -v ".[0-9]{4}-[0-9]{2}") || \
> $(echo $f | egrep $(date +.%Y-%m)) ]] ; then \
> echo $f; \
> fi ; \
> done \
> | sort | xargs echo`
>
> Ziel der Schleife ist, nur die "statischen" Maildirs und die
> dynamischen des aktuellen Monats stehen zu lassen (also für April alle
> <maildir>.Jahr-Monat auszusortieren wo nicht 2005-04 steht)
Das braucht aber ganz schön lange bei meinen 1400 Foldern...
Rund 87 Sekunden!
Bei mir:
__( '/home/michelle.konzack/.mutt/mailboxes' )________________________
/
| mailboxes +.INBOX +.Privat +.Business \
| +.Linux +.BSD +.DOS +.WfW +.Auktionen \
| `tdimapmailboxes .SERVER.` \
| `tdimapmailboxes .Personen.` \
| `tdimapmailboxes .Business.` \
| `tdimapmailboxes .Erotic.` \
| `tdimapmailboxes .Privat.` \
| `tdimapmailboxes .Linux.` \
| `tdimapmailboxes .BSD.` \
| `tdimapmailboxes .DOS.` \
| `tdimapmailboxes .WfW.` \
| +.Binaries \
| `tdimapmailboxes .Auktionen` \
| +.ML_debian.security-announce \
| `tdimapmailboxes .ML_programming` \
| +.BTS_td \
| +.BTS_debian \
| +.Debian_PopCon \
| +.ML_debian.mentors \
| +.ML_debian.user-german \
| +.ML_debian.women \
| +.ML_debian.news-german \
| +.ML_debian.user-french \
| `tdimapmailboxes .ML_mail` \
| `tdimapmailboxes .ML_lugs` \
| `tdimapmailboxes .ML_arabeyes` \
| +.ML_linux.bna-linuxiran@nongnu.org \
| +.ML_linux.users@httpd.apache.org \
| +.ML_debian.devel \
| +.ML_debian.amd64 \
| `tdimapmailboxes .ML_postgresql` \
| `tdimapmailboxes .ML_php` \
| +.ML_linux.bind-announce@isc.org \
| +.ML_linux.bind-users@isc.org \
| `tdimapmailboxes .ML_x-window-system` \
| +.ML_linux.mc@gnome.org \
| `tdimapmailboxes .ML_ffii` \
| +.ML_debian.edu \
| +.ML_debian.firewall \
| +.ML_debian.isp \
| +.ML_debian.jr \
| +.ML_debian.laptop \
| `tdimapmailboxes .ML_linux` \
| `tdimapmailboxes .ML_debian` \
| `tdimapmailboxes .ML_dos` \
| `tdimapmailboxes .BTS_debian.` \
| `tdimapmailboxes .ATTENTION` \
| `tdimapmailboxes .ml4michelle`
\______________________________________________________________________
benötigt nur rund 26 Sekunden.
Naja, in diesem Sinne ist es bei mir komfortabler, da ich
bestimmen kann, in welcher Reihenfolge die mailboxes mit
<TAB> angesprochen werden.
Und da in alten Mailbox Archiv Foldern keine neuen Messges
hinzukommen kriegste auch keinen ärger wenn Du in mutt mit
<TAB> durch die Mailboxen mit neuen Messages gehst.
Das script liegt übrigends hier:
<http://michelle.konzack.home.tamay-dogan.homelinux.net/linux/bash/>
Einfach nach 'tdimapmailboxes' gucken.
> Andreas
Greetings
Michelle
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSM LinuxMichi
0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Attachment:
signature.pgp
Description: Digital signature