Thanks for the feedback.  After I sent it I thought about the fact that
md5sums might not be there, but not about the open.  I also figure I could
make it so that I can feed it the name of the file that contains the sums so
that it might be used on other things.

I am easily amused and I like this script since by running it I don't have to
manually (visually) check the calculated against the given sum.  I am really
prone to transposing digits when doing things of this sort and while the error
would tend to make a good sum look bad, it is still irritating.  Especailly a
1AM after the monster download finished and I want to check to see if it
worked before I crash :-)

Again thanks for the feedback,


Bret

Charles Galpin wrote:

> Bret, the only suggestions I would make are to add some error handling to
> the open call, and close SUMS when you are done. The error handling will
> help one day when you forget the md5sums file, or name it differently or
> something, and the close is just a good habit (perl closes it when the
> script ends anyway)
>
> charles
>
> On Sat, 15 Apr 2000, Bret Hughes wrote:
>
> > Wanting to learn a little about perl and needing to check the md5sums on
> > newly downloaded iso files from redhat, I wrote this script to read the
> > md5sums file and check the md5sums on all the files found in the current
> > directory named in the md5sums file.
> >
> > Perl guru comments welcome if I have done something poorly or not at all
> > that I should have done.
> >
> > #!/usr/bin/perl
> > #printsums
> > #run from the directory that contains the iso files and the md5sums file
> > from redhat
> > #this script reads the md5sums file, runs md5sum on the files if exists
> > in the
> > #current directory and compares the calculated checksums with that
> > contained in the md5sums
> > #file
> > # Bret Hughes [EMAIL PROTECTED] April 15, 2000
> > open (SUMS,"md5sums");
> <snip>
>
> --
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to