[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Backslash mysteriously disappears in command expansion when unescapi
From: |
Chet Ramey |
Subject: |
Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file |
Date: |
Wed, 22 May 2019 15:49:06 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 5/22/19 3:14 PM, Charles-Henri Gros wrote:
> That's what I find a bit surprising (but shells are complicated, so
> maybe this is right. All I know is that the code used to work). I didn't
> think glob expansions applied to command expansions.
Command substitution is one of the word expansions, as is parameter
(variable) expansion. Pathname expansion (globbing) is applied to the
results of the other expansions and word splitting. The order is detailed
here:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06
>
> All I want here is word split (which is why I can't use quotes)
You could always try turning off pathname expansion temporarily with
`set -f'.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
- Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Charles-Henri Gros, 2019/05/21
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Robert Elz, 2019/05/22
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Greg Wooledge, 2019/05/22
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Charles-Henri Gros, 2019/05/22
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Greg Wooledge, 2019/05/22
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Charles-Henri Gros, 2019/05/22
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Greg Wooledge, 2019/05/22
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file,
Chet Ramey <=
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Andreas Schwab, 2019/05/22
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Andreas Kusalananda Kähäri, 2019/05/22
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Robert Elz, 2019/05/22
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Charles-Henri Gros, 2019/05/22
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Greg Wooledge, 2019/05/23
- Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Robert Elz, 2019/05/22
Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file, Robert Elz, 2019/05/22