bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash parameter expansion (remove largest trailing match, remove larg


From: Bruce Lilly
Subject: Re: Bash parameter expansion (remove largest trailing match, remove largest leading match, pattern replacement) does not work
Date: Sat, 29 Aug 2020 14:55:28 -0400

Please don't assume that something output by printf (without quoting) for
clarity is representative of actual expansion by the shell when properly
quoted.

On Sat, Aug 29, 2020, 14:52 Koichi Murase <myoga.murase@gmail.com> wrote:

> 2020-08-29 23:47 Bruce Lilly <bruce.lilly@gmail.com>:
> > Description:
> >         Bash parameter expansion (remove largest trailing match,
> > remove largest leading match, pattern replacement) does not work
>
> In short, (1) ``octal escape \057'' doesn't have special meaning in
> Bash glob patterns.  `[\057]' means just one of a literal backslash or
> digits 0, 5, or 7.  (2) You need to set `shopt -s extglob` to use
> extended glob patterns like `+(...)' and `*(...)'.  Please look at the
> paragraph above the list of extended patterns in the manual.
>
> --
> Koichi
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]