From owner-freebsd-pkg@freebsd.org Thu Feb 16 09:03:15 2017 Return-Path: Delivered-To: freebsd-pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5ED6CE023A for ; Thu, 16 Feb 2017 09:03:15 +0000 (UTC) (envelope-from des@des.no) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id B3BD3889 for ; Thu, 16 Feb 2017 09:03:15 +0000 (UTC) (envelope-from des@des.no) Received: by mailman.ysv.freebsd.org (Postfix) id B31FFCE0238; Thu, 16 Feb 2017 09:03:15 +0000 (UTC) Delivered-To: pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2C56CE0237 for ; Thu, 16 Feb 2017 09:03:15 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7BFE8888; Thu, 16 Feb 2017 09:03:14 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 7FA489FE2; Thu, 16 Feb 2017 09:03:13 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 26EDA282E; Thu, 16 Feb 2017 10:02:03 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Cy Schubert Cc: Alan Somers , scrappy@freebsd.org, Brian Somers , freebsd-bugzilla@ayaken.net, Cy Schubert , pkg@freebsd.org Subject: Re: Bug 217055 - Consolidate random sleeps in periodic scripts References: <201702160054.v1G0sLt8048117@slippy.cwsent.com> Date: Thu, 16 Feb 2017 10:02:02 +0100 In-Reply-To: <201702160054.v1G0sLt8048117@slippy.cwsent.com> (Cy Schubert's message of "Wed, 15 Feb 2017 16:54:21 -0800") Message-ID: <86zihmwlth.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2017 09:03:15 -0000 Cy Schubert writes: > "Dag-Erling Sm=C3=B8rgrav" writes: > > This won't work, because && forks. You need: > >=20 > > if [ -t 0 ] ; then ... ; fi > Are you sure? Maybe it varies from shell to shell... or maybe I confused it with other constructs like 'grep foo bar | while read line' (which definitely doesn't work). I consider it bad style, but that's a matter of taste. I prefer to use && and || only for error conditions and loop control. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no