If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From: Bela Lubkin <belal@caldera.com>
Subject: Re: New /etc/default/cron from OSS642a - Cron supplement
Date: Tue, 17 Dec 2002 19:44:42 GMT
References: <fc5ef85a.0212160509.4e33e924@posting.google.com> <20021216171623.GA10825@jpradley.jpr.com> <fc5ef85a.0212170259.621d72f7@posting.google.com>
alex stuart wrote:
> Jean-Pierre Radley <jpr@jpr.com> wrote in message news:<20021216171623.GA10825@jpradley.jpr.com>...
> > alex stuart typed (on Mon, Dec 16, 2002 at 05:09:58AM -0800):
> > | It appears that during the install of the oss642a patch, a new
> > | /etc/default/cron is installed.
> <snip>
> > But /etc/default/cron describes the purpose of each of those
> > variables; which part of the text leaves you with "cannot
> > determine what they are for"?
>
> Did it? I read only the lines that appeared to be shell envvar assignment
> statements. I'm sorry I can't recheck this: I lost my job yesterday and
> now don't have access to an OpenServer box.
>
> /etc/default/cron appeared to have the same syntax as a shell script. It
> has lines like "OLDPARSING=YES" which appears to be an assignment; and
> comments are introduced with a "#". When I ran a shell script from cron,
> I could echo the PATH variable, set as above, but was unable to access
> the NOTESHELL, INPUT and OLDPARSING envvars (l.h.sides?). I did not notice
> a new man page distributed with the VOLS containing descriptions.
A new man page was not included, but comments were added to
/etc/default/cron, as JPR stated. I just downloaded a fresh copy of
oss642a, extracted etc/default/cron from it, and here is an excerpt:
# NOTESHELL - If set to YES, users submitting cron and at jobs are
# notified if their login shell is different from the shell
# that is used by cron to run jobs.
Setting this to NO turns off the annoying warning:
"warning: commands will be executed using /bin/sh"

# INPUT - If set to NO, the cron job input mechanism is disabled:
# neither % nor \ are changed, removed, or otherwise treated
# specially.
# OLDPARSING - If set to YES, \ and % in cron jobs are acted on in the
# way they were up through OpenServer 5.0.6.
These control the parsing of lines in a crontab. It is an attempt to
get control over an old feature that few people knew about, but which
caused trouble in some crontabs: '%' means `newline'.
There are three combinations:
INPUT=YES, OLDPARSING=YES -- acts like cron in OSR506 and earlier. If
there are any '%' chars in a crontab command field, they are converted
to newlines. The command (everything before the first newline) is
passed the rest as standard input. So:
* * * * * cat%foo%bar%
means: ``every minute, run `cat`, passing as standard input a file
with 2 lines containing the texts "foo" and "bar"''.
=========================================================================
INPUT=YES, OLDPARSING=NO (default configuration in OSR507 and oss642a)
-- same, except now you can prevent the special interpretation of '%'
chars with a backslash. So:
* * * * * echo foo%bar
means: ``every minute, run `echo foo`, passing as stdin a file with
one line containing "bar"''. But:
* * * * * echo foo\%bar
means: ``every minute, run `echo foo%bar`''.
NOTICE that this changes the meaning of '\' in existing crontabs. To
express a literal '\' you need two of them:
* * * * * printf "This outputs\\ntwo lines."
=========================================================================
INPUT=NO, OLDPARSING=(ignored) -- characters '%' and '\' have no
special meaning in crontab lines. So:
* * * * * echo foo%bar
* * * * * echo foo\%bar
means: ``every minute, run `echo foo%bar`'', and ``every minute, run
`echo foo\%bar`''
>Bela<
Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)
| Views for this page | ||||
|---|---|---|---|---|
| Today | This Week | This Month | This Year | Overall |
| 3 | 3 | 59 | 1,020 | 3,294 |
/Bofcusm/1880.html copyright 1997-2004 Bela Lubkin All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Add your comments