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

next in thread | previous in thread | raw e-mail | index | archive | help
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.


> -- 
> 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

-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se

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?20020214224025.GA1508>