From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qOIbLNUeEmJhFQEAgWs5BA (envelope-from ) for ; Sun, 20 Feb 2022 11:58:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 42F5KNUeEmIs9gAAauVa8A (envelope-from ) for ; Sun, 20 Feb 2022 11:58:29 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2CEA422D00 for ; Sun, 20 Feb 2022 11:58:29 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 5F7195F419; Sun, 20 Feb 2022 10:58:26 +0000 (UTC) Received: from mailproxy02.manitu.net (mailproxy02.manitu.net [217.11.48.66]) by mail.notmuchmail.org (Postfix) with ESMTPS id EDAE25E00C for ; Sun, 20 Feb 2022 10:58:23 +0000 (UTC) Received: from localhost (200116b8602fbb00b7ffabde1854f0da.dip.versatel-1u1.de [IPv6:2001:16b8:602f:bb00:b7ff:abde:1854:f0da]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: michael@grubix.eu) by mailproxy02.manitu.net (Postfix) with ESMTPSA id BB871C00A7; Sun, 20 Feb 2022 11:58:22 +0100 (CET) MIME-Version: 1.0 In-Reply-To: <877d9qqx2n.fsf@tethera.net> References: <8d483901f3cf9bee86d7359ff1d665943adcd31b.1644406756.git.git@grubix.eu> <87pmnvzo3b.fsf@tethera.net> <164449061694.6325.1611477846768874524.git@grubix.eu> <87y22fx1d9.fsf@tethera.net> <877d9qqx2n.fsf@tethera.net> Subject: Re: [PATCH 2/4] test: due not pass T380.1 for the wrong reasons From: Michael J Gruber To: David Bremner , Tomi Ollila , notmuch@notmuchmail.org Message-ID: <164535470209.4544.9894205177904049274.git@grubix.eu> Date: Sun, 20 Feb 2022 11:58:22 +0100 User-Agent: alot/0.10 Message-ID-Hash: WWVGAY6LE7DR3V5UPKN6QB7RKAGJKQQU X-Message-ID-Hash: WWVGAY6LE7DR3V5UPKN6QB7RKAGJKQQU X-MailFrom: michael@grubix.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645354709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=yJDUTGMGvqfHnZ2DiyGjbq46R4+J07soey53mScC8Is=; b=kBX8ntiWcvn8vd2K9wvTuCD0/0W4NX4XHr2e38kwRChOJ9NcAmiz3uu7/vBkLMucqYZR0X P8hsU9cX1VC5io92d6WaeVztyenBBxnSTmvm7mBRqhEjrTFqM0SqIp78OuOrfWkZyd2pnh VtUsq4/NCf+9Y+mD2aqcljheFnLMCMYYUX7yIkYncS54cBLiPqqoVH6D5xNRLTZtBMWtV6 lvwywkhoeG3FsJ32gWZBoubZxz/Cp+o6x7RflpkVvJoijfR50jqYQtT3CKPorF5WCp3s3q /UyHxzwobTVY/EKsNAvIchRJP/EKbVNyMVwb0CKznkacgHbBq63LJ7VmR+QVNA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645354709; a=rsa-sha256; cv=none; b=u2kVrF9i6CwViDXwX72dGX1i6t+19VK8ktFh2RqGe27lZHQo9sj6eThPE5kySTAw/yQzZe J3NXmmrLQ2jE/qu2DIGDiZwrKJ7SoDzr4ywdZQVfAS6mJ75fkmBAloQLW83GzPzt7mukE/ PvVeD92+FyiXW6plKAK6XDTklex4BlyIpCNvU+f0flqVmTvZI7VOh9oOjs0bfhvEwazEFE QJSK4VY2J1R3GxIoMVmSxJbT7zj/MYOeF7LDxt+NptwPkQIpQKoQ8UT7H625he/p42GFn3 vzRgaV2VgkVSR8MpOxXmbMxVRRZuhwpuhEJuyd/CVANwLkZ97eTkd5uQ/Ld84A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.54 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 2CEA422D00 X-Spam-Score: -1.54 X-Migadu-Scanner: scn1.migadu.com X-TUID: UGT88+jqJflo David Bremner venit, vidit, dixit 2022-02-20 00:02:40: > Tomi Ollila writes: > > > > > Wat? afaik echo is builtin in every modern bourne shell derivative... > > > > (I tested: > > $ bash -c 'builtin echo foo' > > foo > > $ bash -c 'export PATH=/tmp; echo foo; ls' > > foo > > bash: ls: command not found > > ) > > Oops. That's what I get for believing "which". Which is another tale of > woe, of course. Builtin in zsh, and not in bash. Not that it matters > here, but probably why it doesn't know about bash builtins. echo is both a builtin (for bash etc) and a command: $ type echo echo is a shell builtin $ which echo /usr/bin/echo The latter is part of GNU coreutils (sh-utils) and often used when one wants to avoid shell pecularities. printf is a builtin Due to the way the builtins were specified (or underspecified in the case of echo) in POSIX, the printf builtin is more portable than the echo builtin. As a rule of thumb, the echo builtin is OK if you don't need options (nor special control sequences) but want a newline at the end of the output anyways; use printf if you need options or format strings. Alternatively, require GNU coreutils and use /usr/bin/echo. Cheers Michael P.S.: I haven't forgotten about the series but it needs quite a bit of rework as we found out.