Shell Script for Appllication Download

Hans Muecke ubuntu-ml01 at filderstadtweather.eu
Fri Nov 25 16:27:15 UTC 2011


Am Freitag, 25. November 2011, um 09:28:09 schrieb Amichai Rotman:

> I have a bunch of tools I carry around in my pocket on a USB DoK.
> 
> I'd like to write a script to do the following:
> 
> 1. Check for the latest version
> 2. If exists - download it

"wget -N ftp://site/tool" or "wget -N http://site/tool" would achive this 
assuming the name of the tool doesn't change. If the name changes (e.g. name 
contains a date or version) you would have to work with a wildcard added to 
(parts of) the name. 
That way wget checks if the file on the serber is newer, than the onb you have 
locally and only will download it if it's newer than the local file. 

> 3. Send me an e-mail advising me that X application has been downloaded.

Locally this can be done with setting up a cron job, which will "email" root 
(or any other local user)

-- 
Talk to you later ... Hans (287 to go)
 
2011/11/25 15:50
EDDS 251550Z 32001KT CAVOK 03/M03 Q1027 NOSIG




More information about the ubuntu-users mailing list