Gossamer Forum
Home : General : Perl Programming :

Wget...

Quote Reply
Wget...
I've got a REALLY annoying problem here. In one of my script, I have the following to delete the old content.rdf.u8.gz file, then get the new one, and then decompress it. For some reason the old file is not getting deleted, and the new one is still being downloaded, but being saved as content.rdf.u8.gz.1 etc. Anyone see any stupid errors here that would cause the file not to delete?

Code:
# get rid of the old file...
`unlink content.rdf.u8.gz`;

$main_rdf_start_time = time;
`wget http://dmoz.org/rdf/content.rdf.u8.gz`;

`gzip -d content.rdf.u8`;

Any ideas would be appreciated Smile

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [A.J.] Wget... In reply to
`unlink content.rdf.u8.gz`;

=>

unlink "content.rdf.u8.gz";


`gzip -d content.rdf.u8`;

=>

Umm you can't decompress something that isn't gzipped
Quote Reply
Re: [Paul] Wget... In reply to
Ah, thanks for the first one. As for the second, wanna bet? Just verified it, and it works ok without the .gz part on the end...LOL Tongue (as long as there is no file there that is called content.rdf.u8.gz from previous tries, otherwise it will try and read that).

Thanks Smile

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [A.J.] Wget... In reply to
>>As for the second, wanna bet? <<

Yeah I do want to bet.

I'll bet you $25,000 that you can't decompress a file using gzip when it is already uncompressed Laugh
Quote Reply
Re: [Paul] Wget... In reply to
I was saying that it would decompress a file called content.rdf.u8.gz if you just typed gzip -d content.rdf.u8 actually ;)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

A.J.: Mar 28, 2002, 8:27 AM
Quote Reply
Re: [A.J.] Wget... In reply to
hehe I'll edit mine too then :)

Last edited by:

Paul: Mar 28, 2002, 9:15 AM