Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14154

Re: extglob patterns not expanded in -c command-strings

Path csiph.com!goblin3!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Paulo Marcel Coelho Aragão <marcelpaulo@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: extglob patterns not expanded in -c command-strings
Date Sun, 27 May 2018 22:35:46 -0300
Lines 18
Approved bug-bash@gnu.org
Message-ID <mailman.602.1527471353.1292.bug-bash@gnu.org> (permalink)
References <5b0b4173.1c69fb81.6c66f.f11f@mx.google.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1527471353 17445 208.118.235.17 (28 May 2018 01:35:53 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org, bash@packages.debian.org
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gbuTkhJJkksJDErMOp4ekfxN89+F25gxKsMuNAsf3es=; b=TBrPJ/hyAow8/kVbu3fF0+tZPHVfiQV6fSSuQCyrPxidZ5lOf0gRxwur9mQOKdYsa0 sq9Estn9lgnYLJ5V3zXYzpHt0jt23nvP1lmYdQIZ3GUkEbaocVhgRl7ocR/pO5wOjOyC i7rs1nnOroHdkhAjhEpwmgxeVHckTNHEbGhbZVSMLyXSucID1Ehb6C8KDaZ3wwJZKgZe y+ui0KTXzghHJc4AgA4XihPJxvPg6ye7hwSzD1U8veexD1+FYjX5bqm2BgL7OZ+H3beJ Bv+zbE6YYl2E8VEXoulBG9ZDZ0SbIBbC9Nx/VR6z3L+Jtsh0x9S+I7Q0NCGvxn2Fr0Np 3JoA==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gbuTkhJJkksJDErMOp4ekfxN89+F25gxKsMuNAsf3es=; b=q+/EskZ/DQA66gh1tQy0Hh7x1zeMETvUsWwrrqFFuv3R3PPSnFA/ERMuHnHF5nm+kv Tls5PNeF4BNLKPLKC7TDmBhLn9CjO7mCUj+NteOh3poZNfL3QLtW6sagQS3AztiG8m/5 R25YMO2aD5cBSXxAz9KyH6L9zqFMCnr8LUHiNaQ+UFp6dlreJReiRnKWXBWBOXw7meY+ /rh5lFrRPcstmsFKU1RHXNFlOvOJgqgU6RC9C9onTvLVZCtrXEEmINfE9XuClz7kT6Ml LINu3DVzvLO7VYVl7zy3MRELIS+DtBSnPociHmvEtNT3mSVlkQRBSYfJ4H2tv58hLTXx mCBw==
X-Gm-Message-State ALKqPwcxsKxjsitX3PmBnEIUYgpVyGBxQrAn39AhW+pfL2G9tCyxbUhG idwSJzFmC80xeghjcwD36JVhlA==
X-Google-Smtp-Source ADUXVKLC8twf021rYK3/Tlg1ztrJXdRzJ/yyiLwAFiaSUchoSrKpidYzmmM08ACpPT7koNyfRyJBQA==
X-Received by 2002:a0c:d911:: with SMTP id p17-v6mr9874760qvj.78.1527471348753; Sun, 27 May 2018 18:35:48 -0700 (PDT)
Content-Disposition inline
In-Reply-To <5b0b4173.1c69fb81.6c66f.f11f@mx.google.com>
User-Agent NeoMutt/20171215
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2607:f8b0:400d:c0d::233
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.21
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 <http://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>
Xref csiph.com gnu.bash.bug:14154

Show key headers only | View raw


> bash -c 'shopt -s extglob; echo @(foo*|bar*)'

I've just discovered that this works as expected:

bash -O extglob -c 'echo @(foo*|bar*)'

However, the puzzle lingers on, since running this:

bash -c 'shopt -s extglob; shopt extglob'

results in:

extglob         on

which indicates that the original command should have worked as expected, recognizing the extglob pattern.

There's still a mystery to unveal here.

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


Thread

Re: extglob patterns not expanded in -c command-strings Paulo Marcel Coelho Aragão <marcelpaulo@gmail.com> - 2018-05-27 22:35 -0300

csiph-web