[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why fail , [[ $sep$*$sep == $sep--$sep ]]
From: |
alex xmb sw ratchev |
Subject: |
Re: why fail , [[ $sep$*$sep == $sep--$sep ]] |
Date: |
Tue, 20 Feb 2024 16:36:53 +0100 |
On Tue, Feb 20, 2024, 16:34 Chet Ramey <chet.ramey@case.edu> wrote:
> On 2/17/24 10:07 AM, alex xmb sw ratchev wrote:
> > i was trying and epic failed
> >
> > set aa bb cc -- dd ; f=$'\1' IFS=$f ; [[ $f$*$f == "$f--$f" ]] && echo ye
> >
> > it says no ye
>
> It looks like you've found a bug that manifests itself under a very
> specific set of circumstances: IFS=$'\1', word splitting not performed,
> and an unquoted word. Bash doesn't quote the ^A sufficiently, and since
> it uses ^A as an internal quote character, removes it. This causes the
> match to fail. There are other places this happens: case commands, shell
> pattern expansion, and array subscript expansion.
>
> I pushed a fix for it this morning; there is another change in the
> pipeline.
>
> Chet
>
cool , thanks , bless
--
> ``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/
>
>
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], (continued)
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Kerin Millar, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Chet Ramey, 2024/02/20
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Lawrence Velázquez, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Kerin Millar, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Greg Wooledge, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Chet Ramey, 2024/02/20
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/20
Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Chet Ramey, 2024/02/20