Date: Sun, 7 Sep 2003 22:44:18 -0400 (EDT) From: "Jason Lieurance" <jason@vipersystems.biz> To: <david.fleck@mchsi.com> Cc: freebsd-questions@freebsd.org Subject: Re: Making a certain cron job Message-ID: <14243.205.240.37.184.1062989058.squirrel@www.vipersystems.biz> In-Reply-To: <20030907212701.K1087@grond.sourballs.org> References: <13696.205.240.37.184.1062986048.squirrel@www.vipersystems.biz> <20030907212701.K1087@grond.sourballs.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, Thank you for the response. Does the date part (Date=`date +"%Y-%m-%d"`) go as part of the cron job? Thanks again. -- Jason David Fleck said: > On Sun, 7 Sep 2003, Jason Lieurance wrote: > >> Hello, >> >> We use cronolog to rotate our apache log files so are log files look like so: >> >> 2003-09-07-error_log >> >> Now, I want to make a cron job to mail the log to our webmaster every day but I >> having terrible visualizing how to do it. If I do 'cat /var/log/http/2003-09-* | >> mail -s log web@ourdomain.com' he'll get every log of the month not to mention >> next month I'll have to edit the job. I know I'll need to use variables but I'm >> drawing a blank. Please advise. > > Date=`date +"%Y-%m-%d"` > > cat /var/log/http/${Date}-error_log | mail -s log web@ourdomain.com > > > ? > > -- > David Fleck > dcf@aracnet.com > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14243.205.240.37.184.1062989058.squirrel>