From nobody Mon Jun 7 07:42:22 2021 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 097AFE5ED41 for ; Mon, 7 Jun 2021 07:42:26 +0000 (UTC) (envelope-from SRS0=lh/3=LB=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fz51X6xrTz3wM6 for ; Mon, 7 Jun 2021 07:42:24 +0000 (UTC) (envelope-from SRS0=lh/3=LB=klop.ws=ronald-lists@realworks.nl) Date: Mon, 7 Jun 2021 09:42:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1623051742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QWf9ZuHspFYgNi6cyyz7Ezuip/NgLTHgeeJs6TEOrkg=; b=TGTuZ1wOTx4bQADrGoIY/kYxvopm5LasSZPZRwlOWzZYITU3IfL7eTmxuls77qNtl2QF75 4Eab0mj59OwtcucURvgAzEREG8yQgCZTIs7bs/e+win0vajs+d/y8QVWPZjyhZX8BQDrnZ EVd/Vva32LYBbzR7KoAFh/V9M06gpUl8ldFzJPhIaoicm7A8UVxbnGwDCQIht/eB/yhKlR oCzVNlrKYpW6tlhEoM4LAyLysJwYtVI4sjrd5C7Lfh2t6Dh5jhiBEA9GwRzqZFDpuV4wwW TkygYE2JvEiI+xdms17F8uRAvCafZ7vSPoWQ5lVqWOhHjJDZC8TB89Er8iCCUg== From: Ronald Klop To: freebsd-stable@freebsd.org Message-ID: <50183224.330.1623051742099@localhost> In-Reply-To: <20210606165738.f944a3649687a4ae09bb3cf6@getmail.no> References: <0d9ed5fb-7b98-8fa5-2429-a00c615afc69@klop.ws> <20210606165738.f944a3649687a4ae09bb3cf6@getmail.no> Subject: Re: cron line continuation? List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_329_1222429098.1623051742094" X-Mailer: Realworks (563.279.642d63713bf) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 4Fz51X6xrTz3wM6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=rw2 header.b=TGTuZ1wO; dmarc=pass (policy=none) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of SRS0=lh/3=LB=klop.ws=ronald-lists@realworks.nl designates 194.109.157.24 as permitted sender) smtp.mailfrom=SRS0=lh/3=LB=klop.ws=ronald-lists@realworks.nl X-Spamd-Result: default: False [-2.20 / 15.00]; MID_RHS_NOT_FQDN(0.50)[]; RWL_MAILSPIKE_VERYGOOD(0.00)[194.109.157.24:from]; R_DKIM_ALLOW(-0.20)[klop.ws:s=rw2]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DKIM_TRACE(0.00)[klop.ws:+]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,none]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[194.109.157.24:from]; FORGED_SENDER(0.30)[ronald-lists@klop.ws,SRS0=lh/3=LB=klop.ws=ronald-lists@realworks.nl]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; FROM_NEQ_ENVFROM(0.00)[ronald-lists@klop.ws,SRS0=lh/3=LB=klop.ws=ronald-lists@realworks.nl]; MAILMAN_DEST(0.00)[freebsd-stable] X-ThisMailContainsUnwantedMimeParts: Y ------=_Part_329_1222429098.1623051742094 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Van: Torfinn Ingolfsen Datum: zondag, 6 juni 2021 16:57 Aan: freebsd-stable@freebsd.org Onderwerp: Re: cron line continuation? > > On Sun, 6 Jun 2021 13:56:18 +0200 > Ronald Klop wrote: > > > Hi, > > > > I'm trying to create a cron entry with line continuation. This document mentions the \ character: > > https://docs.freebsd.org/doc/13.0-RELEASE/usr/local/share/doc/freebsd/en_US.ISO8859-1/books/handbook/configtuning-cron.html > > > > The manual pages do not mention this and I can't get it to work. > > > > Is this possible? > > 'man 5 crontab' has this section > The ``sixth'' field (the rest of the line) specifies the command to be > run. One or more command options may precede the command to modify > processing behavior. 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. > > HTH > -- > Torfinn Ingolfsen > > > > Thank you for your answer. I read that part of the manual page. It says that everything after % is used as standard input. That is not what I'm looking for. I would like to rewrite this: @daily freebsd-update -b /data/jails/freebsd13 -d /data/jails/freebsd13/var/db/freebsd-update/ -f /data/jails/freebsd13/etc/freebsd-update.conf --currently-running $( /data/jails/freebsd13/bin/freebsd-version -u) cron && freebsd-update -b /data/jails/freebsd13 -d /data/jails/freebsd13/var/db/freebsd-update/ -f /data/jails/freebsd13/etc/freebsd-update.conf --currently-running $( /data/jails/freebsd13/bin/freebsd-version -u) updatesready > /dev/null && freebsd-update -b /data/jails/freebsd13 -d /data/jails/freebsd13/var/db/freebsd-update/ -f /data/jails/freebsd13/etc/freebsd-update.conf --currently-running $( /data/jails/freebsd13/bin/freebsd-version -u) install to this: @daily freebsd-update -b /data/jails/freebsd13 -d /data/jails/freebsd13/var/db/freebsd-update/ -f /data/jails/freebsd13/etc/freebsd-update.conf --currently-running $( /data/jails/freebsd13/bin/freebsd-version -u) cron \ && freebsd-update -b /data/jails/freebsd13 -d /data/jails/freebsd13/var/db/freebsd-update/ -f /data/jails/freebsd13/etc/freebsd-update.conf --currently-running $( /data/jails/freebsd13/bin/freebsd-version -u) updatesready > /dev/null \ && freebsd-update -b /data/jails/freebsd13 -d /data/jails/freebsd13/var/db/freebsd-update/ -f /data/jails/freebsd13/etc/freebsd-update.conf --currently-running $( /data/jails/freebsd13/bin/freebsd-version -u) install which is much better readable. I can't get this to work so the documentation might be inconsistent. Regards, Ronald. ------=_Part_329_1222429098.1623051742094--