From owner-freebsd-questions Thu Feb 14 14:42:36 2002 Delivered-To: freebsd-questions@freebsd.org Received: from lists.unixathome.org (lists.unixathome.org [210.48.103.158]) by hub.freebsd.org (Postfix) with ESMTP id 70C4837B400 for ; Thu, 14 Feb 2002 14:42:33 -0800 (PST) Received: from wocker (lists.unixathome.org [210.48.103.158]) by lists.unixathome.org (8.11.6/8.11.6) with ESMTP id g1EMgJk29996; Fri, 15 Feb 2002 11:42:20 +1300 (NZDT) (envelope-from dan@lists.unixathome.org) Message-Id: <200202142242.g1EMgJk29996@lists.unixathome.org> From: "Dan Langille" Organization: DVL Software Limited To: Erik Trulsson Date: Thu, 14 Feb 2002 17:42:14 -0500 MIME-Version: 1.0 Subject: Re: crontab entries need a CR/LF at the end Reply-To: dan@langille.org Cc: Rogier Steehouder , questions@freebsd.org In-reply-to: <20020214224025.GA1508@student.uu.se> References: <200202142235.g1EMZIk29951@lists.unixathome.org> X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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