Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #268048

Re: bash parameter expansion "doesn't like" dots?

From John Crawley <john@bunsenlabs.org>
Newsgroups linux.debian.user
Subject Re: bash parameter expansion "doesn't like" dots?
Date 2024-03-05 04:00 +0100
Message-ID <Ietc5-euim-1@gated-at.bofh.it> (permalink)
References (3 earlier) <Ie6Sd-egSW-1@gated-at.bofh.it> <Ien6F-eqKm-1@gated-at.bofh.it> <Iesg1-etKp-1@gated-at.bofh.it> <IespH-eu2X-1@gated-at.bofh.it> <IesSJ-euc3-1@gated-at.bofh.it>
Organization BunsenLabs

Show all headers | View raw


On 05/03/2024 11:36, Max Nikulin wrote:
> On 05/03/2024 09:02, Greg Wooledge wrote:
>> On Tue, Mar 05, 2024 at 10:49:34AM +0900, John Crawley wrote:
>>>
>>> I think ^ has been deprecated recently. I failed to find a reference on the web just now though.
>>
>> So, ^ isn't "deprecated".  It's just not portable to sh.
> 
> Running shellcheck on a *sh* script with a [^s] glob gives https://www.shellcheck.net/wiki/SC3026
> "In POSIX sh, ^ in place of ! in glob bracket expressions is undefined."
> with some links. There is no warning in the case of a #!/bin/bash script.
> 
> 
Thanks! Shellcheck also says:
"Dash used to support [^c] when compiled with fnmatch and glob from glibc, but it was considered as a bug and fixed in version 0.5.12."

That's the version of dash which arrived in Debian Bookworm.
-- 
John

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: bash parameter expansion "doesn't like" dots? Albretch Mueller <lbrtchx@gmail.com> - 2024-03-04 01:00 +0100
  Re: bash parameter expansion "doesn't like" dots? David Wright <deblis@lionunicorn.co.uk> - 2024-03-04 02:10 +0100
    Re: bash parameter expansion "doesn't like" dots? John Crawley <john@bunsenlabs.org> - 2024-03-04 04:10 +0100
      Re: bash parameter expansion "doesn't like" dots? David Wright <deblis@lionunicorn.co.uk> - 2024-03-04 21:30 +0100
        Re: bash parameter expansion "doesn't like" dots? John Crawley <john@bunsenlabs.org> - 2024-03-05 03:00 +0100
          Re: bash parameter expansion "doesn't like" dots? Greg Wooledge <greg@wooledge.org> - 2024-03-05 03:10 +0100
            Re: bash parameter expansion "doesn't like" dots? John Crawley <john@bunsenlabs.org> - 2024-03-05 03:30 +0100
              Re: bash parameter expansion "doesn't like" dots? Greg Wooledge <greg@wooledge.org> - 2024-03-05 04:00 +0100
                Re: bash parameter expansion "doesn't like" dots? David <bouncingcats@gmail.com> - 2024-03-05 06:30 +0100
                Re: bash parameter expansion "doesn't like" dots? Max Nikulin <manikulin@gmail.com> - 2024-03-05 12:40 +0100
            Re: bash parameter expansion "doesn't like" dots? Max Nikulin <manikulin@gmail.com> - 2024-03-05 03:40 +0100
              Re: bash parameter expansion "doesn't like" dots? John Crawley <john@bunsenlabs.org> - 2024-03-05 04:00 +0100

csiph-web