From owner-freebsd-doc Tue Mar 12 1: 0: 7 2002 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7C1AB37B417 for ; Tue, 12 Mar 2002 01:00:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2C903m66559; Tue, 12 Mar 2002 01:00:03 -0800 (PST) (envelope-from gnats) Date: Tue, 12 Mar 2002 01:00:03 -0800 (PST) Message-Id: <200203120900.g2C903m66559@freefall.freebsd.org> To: freebsd-doc@freebsd.org Cc: From: swear@blarg.net (Gary W. Swearingen) Subject: Re: docs/31265: crontab(1) doesn't decribe format of allow and deny files. Reply-To: swear@blarg.net (Gary W. Swearingen) Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR docs/31265; it has been noted by GNATS. From: swear@blarg.net (Gary W. Swearingen) To: "Matthew D. Fuller" Cc: freebsd-gnats-submit@freebsd.org Subject: Re: docs/31265: crontab(1) doesn't decribe format of allow and deny files. Date: 12 Mar 2002 00:54:10 -0800 "Matthew D. Fuller" writes: > The Right Solution (IMO, of course) is to fix cron to not make what is a > rather non-intuitive choice in parsing the files, then document the > now-simple one-username-per-line. Something like (untested): Looks OK to me, except that if I were doing it (which I'm not) and I could trust the adduser(8) manual about alphanumerics & "_" only (which I can't -- see adding_user(8)), then I'd allow for trailing comments by adding this statement below yours: line[strcspn(line, "#")] = '\0'; > > Your shell (and my pdksh) seem to > > ignore the empty line so it doesn't show as a blank line. > > Well, it's not an empty line that would show as a blank line; that would > require TWO \n's. vis: It would show as a blank line in SOME software. The more intuitive behavior would be to consider a newline character to start a new line, even if empty or at the end of the file. XEmacs, for instance, shows it and counts it, considering it to form an empty line at the end of the file. But the shells and "wc" have good reasons for doing it the other way, no doubt. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message