Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > gnu.bash.bug > #16851

Re: Bash parameter expansion (remove largest trailing match, remove largest leading match, pattern replacement) does not work

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Bruce Lilly <bruce.lilly@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Bash parameter expansion (remove largest trailing match, remove largest leading match, pattern replacement) does not work
Date Sat, 29 Aug 2020 15:25:44 -0400
Lines 20
Approved bug-bash@gnu.org
Message-ID <mailman.1729.1598729159.2469.bug-bash@gnu.org> (permalink)
References <CAPyES363zNvUZHWo6imXOyC3UPU5FAbsyFGzWkcJMO-HBhT6gQ@mail.gmail.com> <CAFLRLk_k+J3-Nt9UJ4Fb8c-RewPnVjf_b=ShqGGASG0GmREAhg@mail.gmail.com> <CAPyES3685SjyZfrL+M_56wGqxvh=N9xNchWJ1xqMSrmmEJb9ww@mail.gmail.com> <CAMLQOtQtYxMiiP9=nN72AKC+hKTJ06rLxM7=Nt5LF1M47jvWrA@mail.gmail.com> <CAPyES36MM0OL2gDnaqfpywoyRwk29NWSXWTNFSCgA4a+jBfENQ@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1598729160 1290 209.51.188.17 (29 Aug 2020 19:26:00 GMT)
X-Complaints-To action@cs.stanford.edu
Cc Koichi Murase <myoga.murase@gmail.com>, bug-bash@gnu.org
To Ilkka Virta <itvirta@gmail.com>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zLYIn14F2JwitdGFun6lshAyENxdGvhZby1n5wk2lJY=; b=EUcwZcXuoHYMrDV2zn/1IYIj7CqpIGvlbcp1muI2ITZt/x6e5LFxCzsePE4FywtEoM bopYp/ix0N0kYjs/Qn4iEtlx3O4oDdshweuMNY7XVGAPvOftybyjxzPLDEjPS51QdOs0 fsH3zKy0nASF7Rsg88EFtvFRi6rXxrMLawP+KoGC9ciURUU7pv/k/MrFOCOGwNSKD+xu VMWy2HhIjsl3gapcOrkZzUW+kC8CBknnyawNxcX5jNHVsJYdRpW0I3qJRe6bQ2SMd9Mm eLcL+zcsQW5qCIiIC/Qc0zlYdZnPip8/lkYtK2kFummbCYIfE7zdxobh8LJiJ7P1RmJ1 Dufg==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zLYIn14F2JwitdGFun6lshAyENxdGvhZby1n5wk2lJY=; b=pdvNYGv6V2bpbH32vLhVQo+h0rlHnb8nUMHEKIOx9CtQwoubbMiMBZyCH2P/UZW2LK +PVB5lUShpVOdSvpNjD59tFhGFHL5+tYRqKXwF37wMdI5O0+MsPbMjtxMbMqcPAP9Vut jyZP0bLNNaza8PSO+BFCPmAuhuMlGFeIpgpRR340FF0e3EJ+i28OBEPKewDNCuuPA2wi eGGvoQxznLj1lPJk4mZe7BE1ImIqK2XeFJz1r+gAv4xKJcFJu9GrOez6aAAxeQVUW3Hx QOB8G1LAFa3Dudci+fdeSM0eUSYrJgzRNUu8U0zL6LY0zer3yJRrsHKbbleLy1FitE2O M7vw==
X-Gm-Message-State AOAM530i0dtqGEX5uPxtX/45r75r/khjQboz5P72ygJWZZ+3UG1wSYq8 D05Uzj4sMj/c9PVmkg2b2t1KRRd60ocbaYTABzY=
X-Google-Smtp-Source ABdhPJwmyAt4iEgSQhxMKFUmSR55SlWJ+/ldywjWtsRxSt8SKHNFXxlLRFerakt267/Bi7rbYBje8JFWPiFhItwAkFY=
X-Received by 2002:a6b:8d57:: with SMTP id p84mr3388359iod.206.1598729155279; Sat, 29 Aug 2020 12:25:55 -0700 (PDT)
In-Reply-To <CAMLQOtQtYxMiiP9=nN72AKC+hKTJ06rLxM7=Nt5LF1M47jvWrA@mail.gmail.com>
Received-SPF pass client-ip=2607:f8b0:4864:20::d30; envelope-from=bruce.lilly@gmail.com; helo=mail-io1-xd30.google.com
X-detected-operating-system by eggs.gnu.org: No matching host in p0f cache. That's all we know.
X-Spam_score_int -20
X-Spam_score -2.1
X-Spam_bar --
X-Spam_report (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action no action
X-Content-Filtered-By Mailman/MimeDel 2.1.23
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAPyES36MM0OL2gDnaqfpywoyRwk29NWSXWTNFSCgA4a+jBfENQ@mail.gmail.com>
X-Mailman-Original-References <CAPyES363zNvUZHWo6imXOyC3UPU5FAbsyFGzWkcJMO-HBhT6gQ@mail.gmail.com> <CAFLRLk_k+J3-Nt9UJ4Fb8c-RewPnVjf_b=ShqGGASG0GmREAhg@mail.gmail.com> <CAPyES3685SjyZfrL+M_56wGqxvh=N9xNchWJ1xqMSrmmEJb9ww@mail.gmail.com> <CAMLQOtQtYxMiiP9=nN72AKC+hKTJ06rLxM7=Nt5LF1M47jvWrA@mail.gmail.com>
Xref csiph.com gnu.bash.bug:16851

Show key headers only | View raw


Unfortunately, because bash is GPL, I can't post the copyrighted script
which is covered by a non-GPL license.

On Sat, Aug 29, 2020, 15:22 Ilkka Virta <itvirta@gmail.com> wrote:

> On Sat, Aug 29, 2020 at 9:56 PM Bruce Lilly <bruce.lilly@gmail.com> wrote:
>
>> Please don't assume that something output by printf (without quoting) for
>> clarity is representative of actual expansion by the shell when properly
>> quoted.
>>
>
> If you don't want people to assume (and you shouldn't, if you want them to
> help you),
> you'd better post the actual script you use, and not just something output
> by printf.
> Without that, it's impossible to check what quoting you used, or to
> reproduce the issue.
>
>

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Bash parameter expansion (remove largest trailing match, remove largest leading match, pattern replacement) does not work Bruce Lilly <bruce.lilly@gmail.com> - 2020-08-29 15:25 -0400

csiph-web