Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Zsh hangs sometimes?
- X-seq: zsh-users 12814
- From: Kamil Jońca <kjonca@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Zsh hangs sometimes?
- Date: Fri, 2 May 2008 19:39:43 +0200
- In-reply-to: <1209745744.25440.ezmlm@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <1209745744.25440.ezmlm@xxxxxxxxxx>
I have some maildirs and some mails (files with mails are) duplicated.
(But I don't want to pass them through formail -D)
I wrote script to find duplicates:
==============================
export IFS="
" ;find -type d -not -name cur -not -name tmp -not -name new -not -name "." -not -name ".." | while read q ; do echo $q ; find "$q" -maxdepth 2 -type f |while read w ; do find "$q" -maxdepth 2 -type f |while read e ; do if [[ "$w" < "$e" ]] ; then ; if cmp -s "$w" "$e" ; then echo "$w" "$e" identical ; fi ; fi ; done;done;done
==============================
And sometimes this hangs :(
there's not child processes.
Moreover if I put loops in the subshells (ie. |( while read q ; ....|(while read w ... ) ...) )
then everthings luks good.
Am I missing something?
zsh 4.3.6 (i686-pc-linux-gnu)
Debian GNU/Linux lenny/sid
Linux alfa.kjonca 2.6.25+1 #2 PREEMPT Tue Apr 29 12:44:38 CEST 2008 i686 GNU/Linux
KJ
PS. I know about O(n^2) comparisions between files.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author