On Tue, May 26, 2009 at 09:58:50PM +0100, Eric Kow wrote:
> In case any Perl hackers want to help us translate this to shell, or
> maybe Haskell if need be:
> 
> # succeeds if there are hard links
> use File::Basename;
> $res=0;
> while ($fn=<'$1'/*>) {
>   $fn2="'$2'/" . basename($fn);
>   @fd1=lstat($fn);
>   @fd2=lstat($fn2);
>   $res += ($fd1[1] != $fd2[1]);
> };
> exit($res);

Looks like that is comparing all similarly named files between
two directories ($1 and $2) and determining if their inode numbers
(the second element returned from lstat is the inode number) are
the same.

-kolibrie

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to