sslug-teknik team mailing list archive
-
sslug-teknik team
-
Mailing list archive
-
Message #64159
Re: Crontab - første mandag i måneden
-
To:
sslug-teknik@xxxxxxxx
-
From:
Peter Makholm <peter@xxxxxxxxxxx>
-
Date:
Fri, 06 Jun 2003 13:43:06 +0200
-
Cancel-lock:
sha1:Kgu1oR9k7QJpeoCFJs2DyV82Tf4=
-
Delivered-to:
mailing list sslug-teknik@xxxxxxxx
-
In-reply-to:
<bbpufb$4np$1@www.sslug.dk> (Jesper Honig Spring's message of "Fri, 06 Jun 2003 13:35:27 +0200")
-
Mailing-list:
contact sslug-teknik-help@xxxxxxxx; run by ezmlm
-
Newsgroups:
sslug.teknik
-
Organization:
hacking.dk - Doing fun stuff with open source
-
User-agent:
Gnus/5.09002 (Oort Gnus v0.20) XEmacs/21.4 (Portable Code, linux)
-
Xyzzy:
Nothing happens!
Jesper Honig Spring <sslug@xxxxxxxxxxxxxxx> writes:
>> [ `date +%a` == "Fri" ] && echo "flaf"
> if [ `date \+\%u` -eq 2 ]; then echo "hello world"; fi
Det er helt præcis %-tegnet der er problemet.
crontab(5) siger:
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.
--
Peter Makholm | First you fall in love with Antarctica, and then it
peter@xxxxxxxxxxx | breaks your heart
http://hacking.dk | -- Antarctica
References