Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Feb 2002 17:42:14 -0500
From:      "Dan Langille" <dan@langille.org>
To:        Erik Trulsson <ertr1013@student.uu.se>
Cc:        Rogier Steehouder <r.j.s@gmx.net>, questions@freebsd.org
Subject:   Re: crontab entries need a CR/LF at the end
Message-ID:  <200202142242.g1EMgJk29996@lists.unixathome.org>
In-Reply-To: <20020214224025.GA1508@student.uu.se>
References:  <200202142235.g1EMZIk29951@lists.unixathome.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 14 Feb 2002 at 23:40, Erik Trulsson wrote:

> On Thu, Feb 14, 2002 at 05:35:13PM -0500, Dan Langille wrote:
> > On 14 Feb 2002 at 23:09, Rogier Steehouder wrote:
> > 
> > > On my 4.4-RELEASE crontab(5) gives:
> > > 
> > > > The ``sixth'' field (the rest of the line) specifies the command to
> > > > be run. The entire command portion of the line, up to a newline or %
> > >                                     ^^^^^^^
> > > > character, will be executed by /bin/sh or by the shell specified in
> > > > the SHELL variable of the cronfile.  Percent-signs (%) in the
> > > > command, unless escaped with backslash (\), will be changed into
> > > > newline characters, and all data after the first % will be sent to
> > > > the command as standard input.
> > 
> > Thank you for pointing that out.
> > 
> > > So, yes, it needs a newline character at the end.
> > 
> > I disagree. It appears that newline or % is used to delimit one command
> > from another.  It does not mention end of file.
> 
> It doesn't have to. In Unix a 'line' is generally defined as zero or
> more non-newline characters followed by a newline.
> So if it doesn't have a newline at the end, it isn't a line.

Good points.  So do you think the exhibited behaviour conforms to POLA?  I 
don't.
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202142242.g1EMgJk29996>