Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Setting Date Variable for Cron Job
- Date: 17 Jun 2002 17:29:30 +0900
- From: Charles Muller <acmuller@example.com>
- Subject: Re: [tlug] Setting Date Variable for Cron Job
- References: <20020617.164612.74750663.acmuller@example.com> <87d6uq9w1z.fsf@example.com>
Thanks to all for the advice on the Cron line, and especially to Stephen, for the detailed instruction. It now works the way it should. Regards, Chuck ----------------------------------- > >>>>> "Charles" == Charles Muller <acmuller@example.com> writes: > > cp -f /home/chuck/.emacs /home/chuck/Documents/programming/emacs-`date+"%Y%m%d"`.txt > > (1) As a matter of style, you should put the `+' inside the "". > (2) You don't need the "". > (3) You _do_ need a space between the "data" and the "+" -- it's > protected by the backquotes, so it doesn't break up the file name. > (4) You should get in the habit of doing this in stages, eg > > TIMESTAMP=`date+"%Y%m%d"` > cp -f /home/chuck/.emacs /home/chuck/Documents/programming/emacs-$TIMESTAMP.txt > > The reason is that as you start doing more complex things, you'll want > to manipulate the same file later, eg > > TIMESTAMP=`date+"%Y%m%d"` > cp -f /home/chuck/.emacs /home/chuck/Documents/programming/emacs-$TIMESTAMP.txt > gzip -9 /home/chuck/Documents/programming/emacs-$TIMESTAMP.txt > > There are ways to do this without the variable, but they're either > less reliable, or harder to understand and debug. > > -- > Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp > University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN > My nostalgia for Icon makes me forget about any of the bad things. I don't > have much nostalgia for Perl, so its faults I remember. Scott Gilbert c.l.py > >
- References:
- [tlug] Setting Date Variable for Cron Job
- From: Charles Muller
- Re: [tlug] Setting Date Variable for Cron Job
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: RE: [tlug] Japanese and Perl
- Next by Date: Re: [tlug] using unicode with lambda
- Previous by thread: Re: [tlug] Setting Date Variable for Cron Job
- Next by thread: Re: [tlug] Setting Date Variable for Cron Job
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links