Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16359
| Path | csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Lawrence Velázquez <vq@larryv.me> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: Command substitution |
| Date | Wed, 3 Jun 2020 03:57:38 -0400 |
| Lines | 37 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.1041.1591171065.2541.bug-bash@gnu.org> (permalink) |
| References | <87mu5kgbxu.fsf@hobgoblin.ariadne.com> <20200603063850.GH8205@medium.hauri> <20200603091835.c349069068c6822c17f1739e@schrader-schulte.de> <27BB07E0-09FA-401E-B8AC-B3DC124F080E@larryv.me> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1591171066 17310 209.51.188.17 (3 Jun 2020 07:57:46 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | felix <felix@f-hauri.ch>, bug-bash@gnu.org |
| To | Martin Schulte <gnu@schrader-schulte.de> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=larryv.me; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm3; bh=0 EV5gMrScne8lXpTaQp8oX2CxyBgKK7n5azlW8sg1Aw=; b=RRsZsjPsYnN4NupOU d1QHJozEgsfysvlE88cIq5anv0oyGOpbcVOqFMYGt9BGrm2oDJAfZCpz3SQC9ddW uEQ7FFyj5qW9Lo9dXQaUHDOYps8cnNGgNssXiF2xBKbVMKNjAAiK7uBZ5iAe+lWO S1rQxBNQm9BzvGGMch+Zf0mT2jWXk4d7TbfM00un/H/+88OCKdCk8nK6sU5sinNI 82/QrwXc4m8oXDP2fOcTew1J8wt9okh3/GpZjH6wmizw78+NTdLIQpgvkPHEM6Dp HUqmls5yT7lDvsebCbkd9h5ME3Zp5An6pJleTpvZPjdi9qgQPWPiDYG3HmiSK42l lZA5g== |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=0EV5gMrScne8lXpTaQp8oX2CxyBgKK7n5azlW8sg1 Aw=; b=c1rRijSFz5nYE0OzEP427LAjSVrv/x9LOlyEgzQCtY7L6paOxmc3qTRxH XNKB6FivZWddQg6/XuSChZVkYu83CwDmIG2XYjM6Ig4t4grneDLFTnoPkR8VELmr SHytUmhy01KMmpnt+zBuB/RAgvyLZux2TMP2CgT+X0ATKp60LEiNwKilJJyIVswv gW6UHtVydP5TDoo1wFY6hRrDSJe/C58Cbw+Cvq+kyYR52ZCl0Xm8rBbIhtAIGJSP vETbDgDajF62wh4DH++TVkXXo/tyHu1o7xt0YOxEv5iR0HQW3c0pFdgE0NjOtn/g qlmCx1ZjA89yYxxvUrAaTCvBs2gMQ== |
| X-ME-Sender | <xms:9FfXXsXtzaS7InU2lCgKMyAnAlCP9jL5VzkITkBKCsbD497GVairlw> |
| X-ME-Proxy-Cause | gggruggvucftvghtrhhoucdtuddrgeduhedrudefkedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurheptggguffhjgffgffkfhfvofesth ejmhdthhdtvdenucfhrhhomhepnfgrfihrvghntggvpgggvghljoiiqhhuvgiiuceovhhq sehlrghrrhihvhdrmhgvqeenucggtffrrghtthgvrhhnpedvvedutdejffffledugfduie duffdutdeukefhfedvudfggfetffeugeffleejtdenucffohhmrghinhepfihoohhlvggu ghgvrdhorhhgnecukfhppedujedvrdehkedrvddvkedruddvgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehvqheslhgrrhhrhihvrdhmvg |
| X-ME-Proxy | <xmx:9FfXXglX3363GklzcMe53kPcvBK9eZE0tl4g_nW6H0rGiaMlJfRmRg> <xmx:9FfXXgZ99q6zuAv5pMwm2eKA4lutITUW6H5o50ur6cxzzOr45SZcvg> <xmx:9FfXXrULsq0uTv_3HOqKgHl-YIgyLETGx611eNeqBxj9OqXwvJPhWw> <xmx:9FfXXgQC6qwSy9-MW_Dzep_E2KIsyczo7hAw6juQ9oeJTMxxvZ3dQQ> |
| In-Reply-To | <20200603091835.c349069068c6822c17f1739e@schrader-schulte.de> |
| X-Mailer | Apple Mail (2.3445.104.14) |
| Received-SPF | pass client-ip=66.111.4.29; envelope-from=vq@larryv.me; helo=out5-smtp.messagingengine.com |
| X-detected-operating-system | by eggs.gnu.org: First seen = 2020/06/03 03:57:40 |
| X-ACL-Warn | Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] |
| X-Spam_score_int | -27 |
| X-Spam_score | -2.8 |
| X-Spam_bar | -- |
| X-Spam_report | (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN |
| X-Spam_action | no action |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <27BB07E0-09FA-401E-B8AC-B3DC124F080E@larryv.me> |
| X-Mailman-Original-References | <87mu5kgbxu.fsf@hobgoblin.ariadne.com> <20200603063850.GH8205@medium.hauri> <20200603091835.c349069068c6822c17f1739e@schrader-schulte.de> |
| Xref | csiph.com gnu.bash.bug:16359 |
Show key headers only | View raw
> On Jun 3, 2020, at 3:18 AM, Martin Schulte <gnu@schrader-schulte.de>
> wrote:
>
>> Unfortunely, I don't retrieve this behaviour in man page.
>
> Me neither, maybe the manual should read
>
> If the substitution appears within double quotes *or as the right-hand
> side of an variable assignment*, word splitting and filename expansion
> are not performed on the results.
>
> at end of 3.5.4.
The 5.0.17(1) man page does mention this, under "PARAMETERS" (section
3.4 "Shell Parameters" in the manual):
A variable may be assigned to by a statement of the form
name=[value]
If value is not given, the variable is assigned the null string.
All values undergo tilde expansion, parameter and variable
expansion, command substitution, arithmetic expansion, and quote
removal (see EXPANSION below). If the variable has its integer
attribute set, then value is evaluated as an arithmetic expression
even if the $((...)) expansion is not used (see Arithmetic
Expansion below). Word splitting is not performed, with the
exception of "$@" as explained below under Special Parameters.
Pathname expansion is not performed.
There are a couple of other places where word splitting and pathname
expansion are not performed:
https://mywiki.wooledge.org/Quotes#When_Should_You_Quote.3F
vq
Back to gnu.bash.bug | Previous | Next | Find similar
Re: Command substitution Lawrence Velázquez <vq@larryv.me> - 2020-06-03 03:57 -0400
csiph-web