#!/bin/sh # To: bug-bash@gnu.org From:Jim Baar jimbar@seznam.cz # BUG: command "case in esac" do not work properly with two values # this do not work properly for value \\001 # in function do not work properly for value \\177 # examples: function casein () { x=$1 case "$x" in $y)echo OK;; *) echo KO;; esac } # work OK y=`echo -en "\\002"` x=$y case "$x" in $y)echo OK;; *) echo KO;; esac # work BAD! only for \\001 y=`echo -en "\\001"` x=$y case "$x" in $y)echo OK;; *) echo KO;; esac # work BAD! only for \\001 x=`echo -en "\\001"` case "$x" in `echo -en "\\001"`)echo OK;; *) echo KO;; esac # work OK for \\002 x=`echo -en "\\002"` case "$x" in `echo -en "\\002"`)echo OK;; *) echo KO;; esac # with function # work BAD only for \\001 y=`echo -en "\\001"` x=$y casein "$x" # with function # work BAD only for \\001 y=`echo -en "\\177"` x=$y casein "$x" exit 0 # GNU bash, version 2.05a.0(1)-release (i686-pc-linux-gnu) # Copyright 2001 Free Software Foundation, Inc. # RetHat 7.3,7.0 # Celeron 400MHz # 196M RAM # RedHat 7.3 -> kernel 2.4.18-3