PERL   16

cksum-convert.pl

Guest on 18th August 2022 01:17:00 AM

  1. #!/usr/local/bin/perl
  2. #
  3. # by adulau@foo.be
  4. #
  5. # Convert file from BSD checksum format to gnu format
  6. #
  7. # Usage : cat MD5 | perl cksum-convert.pl | md5sum -c
  8. # Usage : cat SHA1 | perl cksum-convert.pl | sha1sum -c
  9.  
  10. while (<STDIN>)
  11. {
  12.  s/ //;
  13.  chomp();
  14.  my @ent = split (/=/);
  15.  m/\(([^)]+)/;
  16.  print $ent[1]."  ".$1."\n";
  17. }

Raw Paste


Login or Register to edit or fork this paste. It's free.