Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: find duplicate files



zv wrote:
 
>> Cool, but doesn't seem to work?
>> 
>
> Forgot to ignore the second field.
>
>     #!/bin/zsh
>     find-duplicates () {
>          (( # > 0 )) || set -- *(.N)
>          local dups=0
>          md5sum $@ | sort | awk '{ print $2,$1 }' | uniq -c -f1 | \
>                      grep -v '^  *1 ' | wc -l | read dups
>          (( dups == 0 )) && echo "no duplicates"
>     }

Still nothing :)

What's with the third line BTW? Looks like
a comment to me and my editor interprets it that
way as well.

But changing it to $# doesn't help :(

-- 
underground experts united
http://user.it.uu.se/~embe8573



Messages sorted by: Reverse Date, Date, Thread, Author