bug-bash
[Top][All Lists]
Advanced

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

Re: bash-5.0: case command bug


From: Chet Ramey
Subject: Re: bash-5.0: case command bug
Date: Fri, 18 Jan 2019 07:44:56 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/17/19 6:21 PM, Drab Martin wrote:
> Hi,
> 
> I have a problem with bash 5.0:
> 
> -----
> machine1 ~ # bash --version
> GNU bash, version 5.0.0(1)-release (x86_64-pc-linux-gnu)
> Copyright (C) 2019 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> 
> This is free software; you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> machine1 ~ # case "a-b" in *-*-*) echo "This is a BUG" ;; *) echo "This is
> not a BUG" ;; esac
> This is a BUG

I tried this on Gentoo.

address@hidden ~/build/bash-5.0 $ cat x1
case "a-b" in *-*-*) echo "This is a BUG" ;; *) echo "This is not a BUG" ;;
esac
address@hidden ~/build/bash-5.0 $ ./bash ./x1
This is not a BUG
address@hidden ~/build/bash-5.0 $ uname -a
Linux ip-172-31-8-83.ec2.internal 4.9.76-gentoo-r1 #1 SMP Mon Mar 5
06:42:49 UTC 2018 x86_64 Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
GenuineIntel GNU/Linux
address@hidden ~/build/bash-5.0 $ ./bash --version
GNU bash, version 5.0.0(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
address@hidden ~/build/bash-5.0 $ ./bash
bash-5.0$ case "a-b" in *-*-*) echo "This is a BUG" ;; *) echo "This is not
a BUG" ;; esac
This is not a BUG
bash-5.0$ exit
exit

So you installed bash-5.0 as /bin/bash? And kept the /bin/sh symlink?
And still got these results?

address@hidden ~/build/bash-5.0 $ sed 2q
/usr/share/gnuconfig/config.sub
#! /bin/sh
# Configuration validation subroutine script.
address@hidden ~/build/bash-5.0 $ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Mar  1  2018 /bin/sh -> bash

Because when I run bash-5.0 against that configure script, I get:

address@hidden ~/build/bash-5.0 $ ./bash
/usr/share/gnuconfig/config.sub x86_64-pc-linux-gnu
x86_64-pc-linux-gnu

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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