Sponsored Content
Top Forums Shell Programming and Scripting Using md5sum to name file based on URL Post 302578956 by Scott on Saturday 3rd of December 2011 10:32:49 AM
Old 12-03-2011
OK, I have neither wget or md5sum, only curl and md5 Smilie

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 Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

the file: MD5SUM

i downloaded a Linux distribution from a FTP site today, and i found there is a file named MD5SUM in the same directory, with the following contents: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 c9a4d963a49e384e10dec9c2bd49ad73 valhalla-SRPMS-disc1.iso 41b03d068e84d2a17147aa27e704f79b ... (1 Reply)
Discussion started by: samprax
1 Replies

2. Shell Programming and Scripting

Restart script based on MD5sum

Ok, I run a small script, that restarts a perl script when it fails (it's a very unreliable perl script, but I can't change it, it's crucial, and I don't know perl) It outputs data into a logfile. Unfortunately, it also regularly hangs. This is a major problem because if it hangs, no data is... (6 Replies)
Discussion started by: Bakes
6 Replies

3. Shell Programming and Scripting

Duplicate file remover using md5sum--good enough?

This is not a typical question. I have a fully working script but I'm interested in optimizing it. I frequently back up photos and movies from my digital camera and cell phone to both my home/work desktops, laptops, wife's netbook, and my home NAS and often end up with multiple versions of the... (2 Replies)
Discussion started by: Michael Stora
2 Replies

4. Shell Programming and Scripting

Script to check MD5SUM on file

Hi, I currently have a shell script that takes an RPM and scp's it to a set of remote servers and installs it. What I would like to be able to do is make the script get the md5sum of the RPM locally (so get the md5sum of the rpm from where im running the script) and then scp the rpm to the... (0 Replies)
Discussion started by: tb1986
0 Replies

5. Web Development

Regex to rewrite URL to another URL based on HTTP_HOST?

I am trying to find a way to test some code, but I need to rewrite a specific URL only from a specific HTTP_HOST The call goes out to http://SUB.DOMAIN.COM/showAssignment/7bde10b45efdd7a97629ef2fe01f7303/jsmodule/Nevow.Athena The ID in the middle is always random due to the cookie. I... (5 Replies)
Discussion started by: EXT3FSCK
5 Replies

6. Shell Programming and Scripting

md5sum on a file with backslash in its name

Hi there, I found something very weird! Should I report that as a bug or is it me misusing the command? I've got a file with a backslash in its name. I know it's a horrible policy but it's not me. The file came from a mac computer because this is a backup server. Anyway, when using... (8 Replies)
Discussion started by: chebarbudo
8 Replies

7. Shell Programming and Scripting

API Based URL Parsing

Hi Friends, We have a situation where we need to pass API based URL which will return XML response ,and I need to convert those XML response to a delimited flat file. url.txt -- will have http://xyz.com/beta/xxx.xml?isDRR=True&city=London&province=England... (1 Reply)
Discussion started by: rakesh5300
1 Replies

8. Web Development

Mod_rewrite - URL rewrite based upon HTTP_REFERER

Hello, I have added following rewrite cond and rewrite rules but it does not work. RewriteCond %{HTTP_REFERER} ^http://192\.168\.1\.150/categories/.*$ RewriteRule ^(.*)$ http://www.blahblah.com/ When I hit url : http://192.168.1.150/categories/881-Goes?page=7 in my browser - it... (2 Replies)
Discussion started by: ashokvpp
2 Replies

9. Shell Programming and Scripting

Reading URL using Mechanize and dump all the contents of the URL to a file

Hello, Am very new to perl , please help me here !! I need help in reading a URL from command line using PERL:: Mechanize and needs all the contents from the URL to get into a file. below is the script which i have written so far , #!/usr/bin/perl use LWP::UserAgent; use... (2 Replies)
Discussion started by: scott_cog
2 Replies

10. Shell Programming and Scripting

Removing md5sum lines stored in text file

Hello. I'm writing a script where every file you create will generate a md5sum and store it into a text file. Say I create 2 files, it'll look like this in the text file: d41d8cd98f00b204e9800998ecf8427e /helloworld/saystheman d41d8cd98f00b204e9800998ecf8427e /helloworld/test I... (3 Replies)
Discussion started by: batarangs_
3 Replies
CDDB-TOOL(1)						      General Commands Manual						      CDDB-TOOL(1)

NAME
cddb-tool - Get CDDB information SYNOPSIS
cddb-tool parse file [-i|-d|-a|-t] [num|-c|-p] cddb-tool template disc-id tracks cddb-tool send [file] address cddb-tool query server user host disc-id tracks cddb-tool read server user host disc-id genre cddb-tool help DESCRIPTION
cddb-tool is a backend tool for abcde. It is passed information from cd-discid and uses it look up the CD title, artist, and track informa- tion on the cddb database (http://freedb.freedb.org) on the internet. COMMANDS
parse [file] option Get data out of a cddb file (use "-" for stdin). Options (use one and only one): id prints disc id album prints album title track num prints title of track num artist prints artist category prints category cddbgenre synonym for category all parse file and dumps to stdout in a form sourceable by the shell send [file] address Mails file file (or stdin of no file specified) to specified address, using correct format. Category should be one of blues, classical, country, data, folk, jazz, newage, reggae, rock, soundtrack, misc. template [disc-id] [tracks] Generates a template (empty) cddb file to stdout. The command line should be essentially the output of cd-discid. query [server] [user] [host] [disc-id] [tracks] Looks up disc on server (should be of form "http://host/cddb/cddb.cgi") remainder of command line is in the same form as that returned by the cd-discid program. Uses wget, so if you need to use a proxy then just configure wget to do so. user and host will be used for identify- ing ourselves to the CDDB server. Outputs response code and entries with matching CDDB entries, if successful, from the CDDB server. read [server] [user] [host] [disc-id] [genre] Dumps CDDB entry to stdout. File will contain an extra #CATEGORY= line, which leaves it a valid CDDB file but which will be recognized by parse and send commands. Uses wget, so if you need to use a proxy then just configure wget to do so. user and host will be used for identi- fying ourselves to the CDDB server. help Prints usage information. AUTHOR
Nathaniel Smith <njs@uclink4.berkeley.edu>, maintained as part of abcde by Robert Woodcock <rcw@debian.org>. Manual page compiled from help information by Robert Woodcock. CDDB-TOOL(1)
All times are GMT -4. The time now is 07:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy