[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help with pattern matching needed
From: |
Lawrence Velázquez |
Subject: |
Re: help with pattern matching needed |
Date: |
Wed, 12 Jan 2022 01:46:03 -0500 |
User-agent: |
Cyrus-JMAP/3.5.0-alpha0-4569-g891f756243-fm-20220111.001-g891f7562 |
On Wed, Jan 12, 2022, at 12:33 AM, Christoph Anton Mitterer wrote:
> I just noted that bash and klibc sh behave differently from dash and
> busybox sh...
>
> [...]
>
> Does anyone have any explanation for this (other than it being a bug in
> dash/busybox-sh[0])?
I cannot reproduce your dash results on macOS.
% port installed dash
The following ports are currently installed:
dash @0.5.11.3_0 (active)
% cat example.sh
for arg
do
case $arg in
['^.a']) printf '%s matched\n' "$arg" ;;
*) printf '%s did not match\n' "$arg" ;;
esac
done
% dash example.sh '^' . a
^ matched
. matched
a matched
This makes me suspect a bug somewhere, but it's hard to say much
of anything without more details about your shells, operating
systems, libc implementations, etc. It might be more fruitful to
ask the dash and busybox projects.
http://gondor.apana.org.au/~herbert/dash/
https://www.busybox.net/lists.html
--
vq
- Re: help with pattern matching needed, (continued)
- Re: help with pattern matching needed, Christoph Anton Mitterer, 2022/01/07
- Re: help with pattern matching needed, Chet Ramey, 2022/01/08
- Re: help with pattern matching needed, Christoph Anton Mitterer, 2022/01/10
- Re: help with pattern matching needed, Christoph Anton Mitterer, 2022/01/11
- Re: help with pattern matching needed, Lawrence Velázquez, 2022/01/11
- Re: help with pattern matching needed, Christoph Anton Mitterer, 2022/01/11
- Re: help with pattern matching needed, Christoph Anton Mitterer, 2022/01/12
- Re: help with pattern matching needed, Christoph Anton Mitterer, 2022/01/12
- Re: help with pattern matching needed,
Lawrence Velázquez <=
- Re: help with pattern matching needed, Christoph Anton Mitterer, 2022/01/12
- Re: help with pattern matching needed, Greg Wooledge, 2022/01/12
- Re: help with pattern matching needed, Christoph Anton Mitterer, 2022/01/12
- Re: help with pattern matching needed, Greg Wooledge, 2022/01/12
- Re: help with pattern matching needed, Chet Ramey, 2022/01/12
- Re: help with pattern matching needed, Kerin Millar, 2022/01/12