From: "Vladimir N. Oleynik" <dzo@simtreas.ru>
To: dash@vger.kernel.org
Subject: Re: [BUG] any subtitution with @/*: ${@#str} or ${*#str} etc
Date: Sat, 6 Feb 2021 11:16:42 +0400 [thread overview]
Message-ID: <37d4a83b-737e-87aa-6be7-4ce9797ac571@simtreas.ru> (raw)
In-Reply-To: <119bc180-454e-6a36-c880-9f226d97163a@simtreas.ru>
Vladimir N. Oleynik пишет:
> $ echo "${*%b}"
> ab bb bc
>
> but need:
> a b bc
Interesting moment: bash/ksh produde "a b bc" always, but zsh produce
more funny and like for me:
$ echo ${*%b}
a b bc
$ echo "${*%b}"
ab bb bc
$ echo "${*%c}"
ab bb b
but a knotty logic also:
$ echo "${*#a}"
ab bb bc
$ echo ${*#a}
b bb bc
ohhh
--w
vodz
prev parent reply other threads:[~2021-02-06 7:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-06 6:04 [BUG] any subtitution with @/*: ${@#str} or ${*#str} etc Vladimir N. Oleynik
2021-02-06 7:16 ` Vladimir N. Oleynik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37d4a83b-737e-87aa-6be7-4ce9797ac571@simtreas.ru \
--to=dzo@simtreas.ru \
--cc=dash@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).