[Tfug] bash dl script

christopher skeptikos at gmail.com
Mon Aug 25 14:57:27 MST 2008




On Mon, 25 Aug 2008 14:40:20 -0700
Nate <nate at torzo.com> wrote:

> script.sh
> -----------------------
> #!/bin/sh
> 
> # Get date... see 'man date' for format string
> DATE=`date +"%Y-%m-%d"`
> URL="http://www.somesite.com/files/some_file_$DATE.ext"
> OUT="/tmp/some_file_$DATE.ext"
> 
> wget -O $OUT $URL
> -----------------------
> 
> chmod +x script.sh
> 
> Then cron it to run, like every 5 minutes:
> 
> */5 * * * * /path/to/script.sh
> 
> Adjust everything as needed of course.

Wow, it's that simple? Thanks. I've been trying to do
more things with scripts, but I didn't think it would
be that simple. Thanks. I'll let you know if I run into
any probs

-- 
flooose




More information about the tfug mailing list