Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15405
| Path | csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!individual.net!not-for-mail |
|---|---|
| From | Allodoxaphobia <trepidation@example.net> |
| Newsgroups | gnu.bash.bug |
| Subject | Regular Expression matching operation =~ |
| Date | 22 Sep 2019 21:44:34 GMT |
| Lines | 36 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.826.1569200533.2190.bug-bash@gnu.org> (permalink) |
| References | <slrnqofqq2.43b.trepidation@vps.jonz.net> |
| Reply-To | If_you_must-Reply_to@my.sig.adr |
| NNTP-Posting-Host | lists.gnu.org |
| X-Trace | usenet.stanford.edu 1569200533 30696 209.51.188.17 (23 Sep 2019 01:02:13 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | gnu-bash-bug@moderators.individual.net |
| Envelope-to | bug-bash@gnu.org |
| X-Orig-X-Trace | individual.net Jl9p7pQKwpEGa6RkxcN1swWiukaBRksut/J9yi18UXd6U9BOE2 |
| Cancel-Lock | sha1:/JzKlEoHdtZ3YeNvSJRWDCvtPyE= |
| User-Agent | slrn/1.0.3 (FreeBSD) |
| X-Originating-IP | 130.133.4.5 |
| X-ZEDAT-Hint | R |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] |
| X-Received-From | 130.133.4.7 |
| X-Mailman-Approved-At | Sun, 22 Sep 2019 21:02:12 -0400 |
| 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 | <slrnqofqq2.43b.trepidation@vps.jonz.net> |
| Xref | csiph.com gnu.bash.bug:15405 |
Show key headers only | View raw
In moving a bash ver. 4.3.48 (Ubuntu) program to a bash ver. 5.0.11
(FreeBSD) environment I encountered either a bug, a quirk, or
an undocumented feature.
I was using a null regexp as a "match for anything" case when an
optional command line parameter (a test pattern) was omitted.
I boiled down what I was experiencing to
$ bash -version
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
$ [[ "String" =~ "ring" ]] ; echo $?
0
$ [[ "String" =~ "" ]] ; echo $?
0
$
$ bash -version
GNU bash, version 5.0.11(0)-release (amd64-portbld-freebsd12.0)
$ [[ "String" =~ "ring" ]] ; echo $?
0
$ [[ "String" =~ "" ]] ; echo $?
2
$
A null regexp works Just Fine in both the Ubuntu and FreeBSD
environments. E.g.:
$ grep "" /etc/shells
Jonesy
--
Marvin L Jones | Marvin | W3DHJ.net | linux
38.238N 104.547W | @ jonz.net | Jonesy | FreeBSD
* Killfiling google & XXXXbanter.com: jonz.net/ng.htm
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Regular Expression matching operation =~ Allodoxaphobia <trepidation@example.net> - 2019-09-22 21:44 +0000
csiph-web