*BSD News Article 49293


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.sprintlink.net!news.chattanooga.net!tarush!tom
From: tom@tarush.chattanooga.net (Tom Rush)
Subject: Re: crontab and sh scripts
X-Newsreader: TIN [version 1.2 PL2]
Organization: Rush Co.
Message-ID: <DD79B2.n3@tarush.chattanooga.net>
References: <marcus.216.0111D480@ccelab.iastate.edu> <40bmnk$9vo@jraynard.demon.co.uk>
Date: Sat, 12 Aug 1995 13:25:49 GMT
Lines: 25

James Raynard (james@jraynard.demon.co.uk) wrote:
: In article <marcus.216.0111D480@ccelab.iastate.edu>,
: Marcus I. Ryan <marcus@ccelab.iastate.edu> wrote:

[..snip..]

: >I wan't it to update the report nightly, but I can't seem to get the crontab 
: >entry to make it do this.  I have added the lines:
: >#Generate New Prelim Logfiles every day at midnight.
: >59      23      *       *       *       root    /usr/local/bin/stathtml \
: >`date +" %b %B"`

: Remove the 'root' field and all should be well (man 5 crontab for details).

Also watch out for the '%' character!  From aforementioned manpage:

  "Percent-signs (%) in the command, unless escaped with a backslash (\),
   will be changed into newline characters, and all data after the first
   % will be sent to the command as standard input."

This messed me up with an awk command once...

-- 
Tom Rush
tom@tarush.chattanooga.net