mirror of
https://github.com/gnuton/asuswrt-merlin.ng.git
synced 2025-05-19 07:51:46 +02:00
18 lines
310 B
Perl
18 lines
310 B
Perl
#!/usr/bin/env perl -w
|
|
|
|
use Digest::MD5;
|
|
|
|
$num_args = $#ARGV + 1;
|
|
if ($num_args != 1) {
|
|
print "\nUsage: perlmd5 filename\n";
|
|
exit;
|
|
}
|
|
|
|
$filename=$ARGV[0];
|
|
open(my $fh, "<", $filename)
|
|
or die "cannot open $filename $!";
|
|
|
|
$ctx = Digest::MD5->new;
|
|
$ctx->addfile($fh);
|
|
|
|
print lc $ctx->hexdigest . "\n";
|