Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #268046
| From | John Crawley <john@bunsenlabs.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: bash parameter expansion "doesn't like" dots? |
| Date | 2024-03-05 03:30 +0100 |
| Message-ID | <IesJ3-eu99-3@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <Ie505-efMg-1@gated-at.bofh.it> <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> |
| Organization | BunsenLabs |
On 05/03/2024 11:02, Greg Wooledge wrote: > On Tue, Mar 05, 2024 at 10:49:34AM +0900, John Crawley wrote: >> On 05/03/2024 05:27, David Wright wrote: >>> Which shell also matters. The OP appears to be using ^ to negate, >>> but ! has the advantage that it will be understood in bash and dash. >> >> I think ^ has been deprecated recently. I failed to find a reference on the web just now though. > > POSIX specifies that ! is the negation character in glob ranges, largely > because ^ used to be a synonym for | in the old Bourne shell (for the > benefit of keyboards that didn't have a convenient | character). > > The use of ^ as a glob negation is a bash extension. It's nice for > people who may not even realize that they're supposed to be using ! > because they learned regular expressions first. > > So, ^ isn't "deprecated". It's just not portable to sh. ^ worked as a negator in dash character classes up to Bullseye though, so something has changed recently. That's what my web searching failed to find... -- John
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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