Date: Mon, 24 Dec 2001 12:51:02 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Nils Holland <nils@tisys.org> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Questions to all script wizards out there... Message-ID: <20011224185102.GB37641@dan.emsphone.com> In-Reply-To: <20011224192919.A89314@tisys.org> References: <20011224192919.A89314@tisys.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Dec 24), Nils Holland said: > So in order to make wget fetch today's program, I'd run it like this: > > wget -options http://www.dradio.de/dlf/vorschau/2001/12/24.html > > That's the theory, but how do I tell my shell script to do that? I > have two problems, one of which is probably easy to solve, while the > other is a little tough: > > 1) The shell script would have to have a look at today's date and > construct the appropriate URL. It would probably have to obtain the .. > 2) As I said, I'd like to get seven days fetched in advance. An easy way to > do that would be to simply loop multiple times, always incrementing <day> The 'date' command will do both. $ date +"%Y/%m/%d" 2001/12/24 $ date -v +8d +"%Y/%m/%d" 2002/01/01 -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011224185102.GB37641>