Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4C0E1431FAF for ; Mon, 18 Feb 2013 08:25:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cEtLCRe14QAU for ; Mon, 18 Feb 2013 08:25:39 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id A2B45431FAE for ; Mon, 18 Feb 2013 08:25:39 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id EE66410014F; Mon, 18 Feb 2013 18:25:27 +0200 (EET) From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy In-Reply-To: <87ehgg7aar.fsf@zancas.localnet> References: <1359558095-22923-1-git-send-email-tomi.ollila@iki.fi> <87ehgg7aar.fsf@zancas.localnet> User-Agent: Notmuch/0.15+20~g7e29ae9 (http://notmuchmail.org) Emacs/24.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2013 16:25:40 -0000 On Sat, Feb 16 2013, David Bremner wrote: > Tomi Ollila writes: > >> +echo -n "Checking that NEWS header is tidy... " >> +if [ "`exec sed 's/./=/g; 1q' NEWS`" = "`exec sed '1d; 2q' NEWS`" ] > > This patch seems OK to me, although the execs might be a bit overkill > for a script that is run once ever few months. You're right. The 2 extra fork(2):s(*) here doesn't matter... In case you don't amend my patch in following weeks I'll send a new patch :) > d (*) FYI: It is only bash(1) which forks process to execute the external command in such a trivial cases. Most (if not all) other shells have (conservative) heuristics to avoid the "extra" fork there. If you're interested, my simple way to test this is 'strace -ff -o pidc cmd args...' Tomi