This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cron without sendmail generates bogus logfile names
- From: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 09 Sep 2008 18:26:36 -0400
- Subject: Re: cron without sendmail generates bogus logfile names
- References: <84dde90809091503od758f6s6181346bb1c6f9f0@mail.gmail.com>
- Reply-to: cygwin at cygwin dot com
Linus Hicks wrote:
The "poor man's mailer" included as part of the cron package uses the
following construct to generate part of the filename used in making
log file names:
DATE=$(date '+%Y%m%d_%H%M%S')
It then generates the filename as:
FILE="/tmp/cron.$DATE.$$.log"
However, it seems to be tacking on a CR character at the end of the
DATE portion which messes up the generated filenames. I cannot
reproduce this behavior in sh running in an xterm window:
Try running the mailer script through 'd2u'. If that doesn't work,
it suggests a difference in the environment for the cron service
versus your interactive shell. Any chance you have another, Win32-
native "date" hanging around?
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
_____________________________________________________________________
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/