From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 16 Jul 2019 03:36:29 -0700 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 729EB30872EC; Tue, 16 Jul 2019 10:36:29 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-224.ams2.redhat.com [10.36.116.224]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC59A19C59; Tue, 16 Jul 2019 10:36:27 +0000 (UTC) Subject: Re: [PATCH 1/6] edksetup.sh: Use bash variable $PWD instead of executing pwd command From: "Laszlo Ersek" To: Rebecca Cran , devel@edk2.groups.io, bob.c.feng@intel.com, liming.gao@intel.com, leif.lindholm@linaro.org, michael.d.kinney@intel.com, afish@apple.com References: <20190715222516.53254-1-rebecca@bsdio.com> <7ab50474-dcc4-d252-1764-d56027bc60e8@bsdio.com> <9f50c144-21d8-6b0d-8c4c-6a9382e89c50@redhat.com> Message-ID: Date: Tue, 16 Jul 2019 12:36:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <9f50c144-21d8-6b0d-8c4c-6a9382e89c50@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 16 Jul 2019 10:36:29 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 07/16/19 12:32, Laszlo Ersek wrote: > On 07/16/19 04:13, Rebecca Cran wrote: >> On 2019-07-15 19:37, Laszlo Ersek wrote: >>> >>> (Sorry if the reason was already given and I missed it:) >>> >>> Why is this an improvement? >>> >>> The docs at say: >>> >>> "pwd also exists as a built-in to ksh(1), which may have a different >>> default behavior". Is that the reason? >> >> No, it's mainly as a (very minor) optimization: `pwd` runs the command >> (even as a built-in), whereas $PWD simply evaluates the value of the >> variable. >> >> Also, modern scripts as I understand it should generally use $(...) to >> run commands, instead of `...`. >> >> > > Makes sense, thanks. > > For this patch: > > Reviewed-by: Laszlo Ersek ... As I requested a minute ago, my preference would be to see a v3 of the full series on the list -- if you agree, please include the "micro-optimization" language from your reply above in the commit message of this patch, together with my R-b. Thank you! Laszlo