Mercurial > ec-dotfiles
comparison bin/testcrc @ 124:5bafb912837e
Massive addition of old scripts collection.
author | Edho Prima Arief <edho@myconan.net> |
---|---|
date | Wed, 26 Oct 2011 15:22:00 +0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
123:173833e4ba35 | 124:5bafb912837e |
---|---|
1 #!/usr/bin/perl | |
2 | |
3 use strict; | |
4 use warnings; | |
5 use String::CRC32; | |
6 | |
7 my @files = @ARGV or print("Usage u fail") && exit(1); | |
8 | |
9 foreach(@files) { | |
10 my $filename = $_; | |
11 open(FILE,$filename); | |
12 my $crc=crc32(*FILE); | |
13 close(FILE); | |
14 $crc=sprintf("%X",$crc); | |
15 print("$filename: $crc\n"); | |
16 } |