[sclug] cron expression

Jonathan H N Chin jc254 at newton.cam.ac.uk
Tue Jan 23 18:27:26 UTC 2007


Ed Davies wrote:
> However, I needed:
> [ `date -d+9day +%d` = 01 ] && echo boo
> with a leading zero on the number to get it to say "boo".

It off the top of my head and I didn't actually try it out. Sorry.
I meant numeric "-eq" instead of string "=". I always mix them up.
I suppose there could be a problem if test treats "0n" as octal...
So your alternative is probably a better choice all round.


> > You could give DoM as "28,29,30,31" but it hardly seems worth it.
> 27,28,29,30 surely?

Yes. More evidence that I am a fuzzy thinker.
And my name's not Shirley.


-jonathan

-- 
Jonathan H N Chin, 2 dan | deputy computer | Newton Institute, Cambridge, UK
<jc254 at newton.cam.ac.uk> | systems mangler | tel/fax: +44 1223 767091/330508

                "respondeo etsi mutabor" --Rosenstock-Huessy


More information about the Sclug mailing list