Using md5sum to name file based on URL | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Using md5sum to name file based on URL

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-03-2011
The undertaker The undertaker is offline
Registered User
 
Join Date: Dec 2011
Last Activity: 4 December 2011, 4:45 PM EST
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Using md5sum to name file based on URL

I am trying to download a file and make the filename of the file be the md5sum of the URL. I know to use wgets to download the file but I do not know how to do the rest...any help would be appreciated.
Sponsored Links
    #2  
Old 12-03-2011
Scott's Avatar
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 1 September 2014, 1:09 PM EDT
Location: Zürich
Posts: 8,473
Thanks: 330
Thanked 1,046 Times in 913 Posts
OK, I have neither wget or md5sum, only curl and md5

Looking at the man page for wget, it might go something like:

Code:
$ X="http://scrivener.s3.amazonaws.com/Scrivener.dmg"
$ wget $X -O $(echo $X | md5sum)

But, check the man page
Sponsored Links
    #3  
Old 12-03-2011
The undertaker The undertaker is offline
Registered User
 
Join Date: Dec 2011
Last Activity: 4 December 2011, 4:45 PM EST
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you so much for your help.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script to check MD5SUM on file tb1986 Shell Programming and Scripting 0 10-16-2010 07:47 PM
Duplicate file remover using md5sum--good enough? Michael Stora Shell Programming and Scripting 2 08-31-2010 02:48 AM
Restart script based on MD5sum Bakes Shell Programming and Scripting 6 01-02-2009 10:32 AM
the file: MD5SUM samprax UNIX for Dummies Questions & Answers 1 07-05-2002 03:30 AM
What is md5sum??? solvman UNIX for Dummies Questions & Answers 1 09-25-2001 12:31 PM



All times are GMT -4. The time now is 05:06 PM.