From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 20 Jul 2010 19:23:43 +0400 From: Alexey Tourbin To: devel@lists.altlinux.org Message-ID: <20100720152343.GX23050@altlinux.org> Mail-Followup-To: devel@lists.altlinux.org References: <20100717123546.GA21193@dad.imath.kiev.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="38WTx9r8F1BUWUep" Content-Disposition: inline In-Reply-To: <20100717123546.GA21193@dad.imath.kiev.ua> Subject: [devel] /usr/bin/crc32 (was: automated CPAN update: perl summary) X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 15:23:43 -0000 Archived-At: List-Archive: List-Post: --38WTx9r8F1BUWUep Content-Type: multipart/mixed; boundary="Lqu9UxmKHIR7DYMI" Content-Disposition: inline --Lqu9UxmKHIR7DYMI Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 17, 2010 at 03:35:47PM +0300, Igor Vlasenko wrote: > * cpan2rpm =CE=C5 =D5=CD=C5=C5=D4? =D0=C1=CB=CF=D7=C1=D4=D8 =D3=CB=D2=C9= =D0=D4=D9 =C9=DA %_bindir. > =D5 =DE=C1=D3=D4=C9 =D0=C1=CB=C5=D4=CF=D7 =D7 %_bindir =C4=C5=CA=D3=D4=D7= =C9=D4=C5=CC=D8=CE=CF =CD=D5=D3=CF=D2, > =CF=C4=CE=C1=CB=CF =D7 =D7=CF=D4 =DC=D4=C9=C8 %_bindir/* =DA=D2=D1 =CE= =C5 =D5=D0=C1=CB=CF=D7=C1=CE. >=20 > perl-Module-CoreList corelist > perl-Net-RBLClient spamalyze > perl-Archive-Zip crc32 =F3=CB=D2=C9=D0=D4 crc32 =CE=C5 =C9=CD=C5=C5=D4 =CE=C5 =C4=CF=CB=D5=CD=C5= =CE=D4=C1=C3=C9=C9, =CE=C9 =C4=C1=D6=C5 =CF=D0=C3=C9=C9 --help. =EB=CC=C1=D3=D4=D8 =C5=C7=CF =D7 /usr/bin (=D7 =D4=CF=CD =DE=C9=D3=CC=C5 = =D0=CF =DC=D4=C9=CD =D0=D2=C9=DE=C9=CE=C1=CD) =CE=C5=CF=C8=CF=D4=C1. > =F3=D4=CF=C9=CC=CF =C2=D9 =D0=C1=CB=CF=D7=C1=D4=D8, =D7=D9=C7=CC=D1=C4=C9= =D4 =CB=C1=CB =C2=C1=C7. --Lqu9UxmKHIR7DYMI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=crc32 #!/usr/bin/perl # Computes and prints to stdout the CRC-32 values of the given files use strict; use lib qw( blib/lib lib ); use Archive::Zip; use FileHandle; my $totalFiles = scalar(@ARGV); foreach my $file (@ARGV) { if ( -d $file ) { warn "$0: ${file}: Is a directory\n"; next; } my $fh = FileHandle->new(); if ( !$fh->open( $file, 'r' ) ) { warn "$0: $!\n"; next; } binmode($fh); my $buffer; my $bytesRead; my $crc = 0; while ( $bytesRead = $fh->read( $buffer, 32768 ) ) { $crc = Archive::Zip::computeCRC32( $buffer, $crc ); } printf( "%08x", $crc ); print("\t$file") if ( $totalFiles > 1 ); print("\n"); } --Lqu9UxmKHIR7DYMI-- --38WTx9r8F1BUWUep Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkxFv38ACgkQfBKgtDjnu0Y4+ACgn5kM1kurO01Nav+ZhQ9oeMAZ 6qoAn22iZaP/QYZ/xUy+xo1MIQMsPE1i =R5hn -----END PGP SIGNATURE----- --38WTx9r8F1BUWUep--