Exit Codes
Using wget-1.10.2 on FreeBSD-6.1 STABLE I am using wget with the '-n' flag to download files. Since I am using it from within a script, I really need to check the exit codes when it terminates to see if it did in fact download a newer file or not. It does not appear that wget issues an exit code indicating whether it did or did not download a newer file. Is this correct, or am I doing something else wrong? Ciao! -- Gerard Seibert [EMAIL PROTECTED] I love cooking with wine. Sometimes I even put it in the food. Anonymous
Exit code
I wrote a script that downloads new 'dat' files for my AV program. I am using the '-N' option to only download a newer version of the file. What I need is for 'wget' to issue an exit code which would indicate whether a newer file was downloaded or not. Presently I have the script comparing the time of the existing file and then the time of the file after 'wget' has finished running. It would be simpler if 'wget' simply issued an exit code. I have tried various methods but have not been successful in capturing one if it does actually issue it. Perhaps someone might have some further information on this? Thanks! -- Gerard Seibert [EMAIL PROTECTED] No man can have a reasonable opinion of women until he has long lost interest in hair restorers. Austin O'Malley pgpNfS5OyI9wv.pgp Description: PGP signature
Re: Exit code
On Monday 21 August 2006 11:17, Mauro Tortonesi wrote: unfortunately at the moment wget does not define a specific list of exit values according to program exit states. that's a major problem we'll have to fix in the next 1.12 release. Thanks, I look forward to it. It would make using 'wget' in scripts a lot easier. -- Gerard Seibert [EMAIL PROTECTED] If I don't see you in the future, I'll see you in the pasture. pgpvt974dqFDM.pgp Description: PGP signature
Re: wget silently overwrites a file when using -c and the server does not support resuming
Ori Avtalion wrote: Using 1.10.2 To reproduce: 1) Download a video from Google Video: $ wget -O Test.resume_me.avi http://vp05.video.l.google.com/videodownload?version=0secureurl=twAAAKKXmJe_gUGC30JVHiQCrmBhoU7JEoYkn1zkPRI9Vm4nYjXB_Lconoy-Fwa2rg40mCn-w3frP3K4KTW7vxmD2bubcJainv-i4vxBqUS_k2VtLtsJI04UFSYcVQVESuIqHZfGuToqj3r3HkfzbKYgoRSzAEI6xUl3-jQKsKAgpQzwoaRbExjhOU2kup9A0VxOlC_KdqG2QWMejRjLZZEfCDb4ETaWEBT0qIGq3W_GS6sKcx6dKXYGMuiGbd4Wf9v3Mgsigh=ongRDut1aAA_QP6pwGRnwIWO2k0begin=0len=1221999docid=9076288729387457440rdc=1; 2) Cancel the download after a few seconds. 3) Re-download, using the -c flag. Result: The old file will be silently overwritten. Wget should refuse downloading the file. The docs specifically state: Beginning with Wget 1.7, if you use -c on a non-empty file, and it turns out that the server does not support continued downloading, Wget will refuse to start the download from scratch, which would effectively ruin existing contents. If you really want the download to start from scratch, remove the file. Did you actually confirm that a partially downloaded file existed? I have canceled downloads and no trace of the partially downloaded file was to be found. -- Gerard Seibert [EMAIL PROTECTED]
Exit Codes
Does the latest version of 'wget' support exit codes? I know that the older versions did not. Thanks! -- Gerard I feel sorry for people who don't drink. When they wake up in the morning, that is as good as they are going to feel all day. Frank Sinatra