[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why fail , [[ $sep$*$sep == $sep--$sep ]]
From: |
Greg Wooledge |
Subject: |
Re: why fail , [[ $sep$*$sep == $sep--$sep ]] |
Date: |
Sun, 18 Feb 2024 18:33:10 -0500 |
On Sun, Feb 18, 2024 at 03:56:45PM -0500, Lawrence Velázquez wrote:
> This surprises me because IFS is not lost if it's set to something
> a little less ... weird:
>
> $ (set aa bb cc -- dd; f=+ IFS=$f; set -x; [[ $f$*$f == *"$f--$f"* ]])
> + [[ +aa+bb+cc+--+dd+ == *\+\-\-\+* ]]
>
> Why the difference?
Without any actual knowledge of the issue, let me just point out that
bash uses $'\1' internally for a few different things, and therefore
using it in your own code sometimes triggers bugs.
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], (continued)
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/17
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Kerin Millar, 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 ]], 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 <=
- 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