How to check md5sum using bash?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

How to check md5sum using bash?

#1 Post by RSH »

Hi,

i use a script to run programs from sfs files, that loads the sfs automatically if it is not loaded. It also downloads the sfs from the web if it is not found on the computer.

Now i want to make automatically a md5sum check of the downloaded file. The md5sum is already in the run-script i just need to know how i can create a md5sum using BASH.

I need the result as a $md5sumcheck variable not as console output.

So, i think i have to script something like this:

Code: Select all

md5sumresult=$(md5sumfunc file_to_check)
But what function does create md5sum using bash?
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#2 Post by RSH »

:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:

Sometimes it is really easy!

Why not using the busybox function md5sum?

:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

Sometimes it is really easy!
I share your joy :D :D :D
Savour the easy . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#4 Post by RetroTechGuy »

RSH wrote::lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:

Sometimes it is really easy!

Why not using the busybox function md5sum?

:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:
My favorite from the command line is "md5deep", which does a very nice recursive md5 (nice for comparing the contents of one drive against another). It reports both file size, and md5, so you can look for identical copies of the "big hitters".
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

Post Reply