On Fri, 19 May 2000, Lang Zhi wrote:
> Hi.
> I need to backup some files every day. So, we use cron right ?
> The file format is like this : abc.20000519.
> So the next day, the new backup file will be named abc.20000520 and so on.
>
> The problem here is, how do i get the "20000520", "20000521" and ... ?
> This is actually the current date. I try to use the "date" , then "cut" and
> "tr" it, but it doesn't work.
>
> So, any idea guyz ?
> Any other command that can be use ?
>
try this from a shell prompt:
date +%Y%m%d
I'll leave the incorporation of this into your script as an exercise for
you...
--
Phil Edwards
Technical Services Engineer
==========================================================================
Travellog Systems Phone +44 (0)1444 459016
The Priory, Haywards Heath Fax +44 (0)1444 456655
West Sussex, RH16 3LB mailto:[EMAIL PROTECTED]
United Kingdom http://www.travellog.co.uk
==========================================================================