Package: bash
Version: 4.1-3
Severity: normal

Text equivalency should use '==' (as per man page and before Deb 6), 
but now needs '='.

Parameter expansion as per man page uses ${param:start:length} and worked prior 
to Debian 6, but now fails miserably.

--------------Example code follows for file test.sh--------------

#!/bin/sh

#       Execute via "sh test.sh"
#
#       Note that Bash' manual says '==' is used to test for
#       string (in)equality.  It used to work, but now does not.
#
#       The Parameter Expansion section of the Bash man page says
#       that ${parameter:offset:length} is the correct format
#       to extract a substring.  It used to work, but now does
#       not.

A="asd"

if [ $A = "asd" ]; then         # Why must '==' be '=' to work correctly?
  echo "EQUAL"
else
  echo "NOT EQUAL"
fi

R=$(/sbin/runlevel)
echo "runlevel = $R"

S=${R:2:1}                      # What is wrong with this?
echo "runlevel is actually $S"

-------------end of example code illustrating bad behaviour-----

-- System Information:
Debian Release: 6.0.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_CA.utf8, LC_CTYPE=en_CA.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash depends on:
ii  base-files                6.0squeeze1    Debian base system miscellaneous f
ii  dash                      0.5.5.1-7.4    POSIX-compliant shell
ii  debianutils               3.4            Miscellaneous utilities specific t
ii  libc6                     2.11.2-10      Embedded GNU C Library: Shared lib
ii  libncurses5               5.7+20100313-5 shared libraries for terminal hand

Versions of packages bash recommends:
ii  bash-completion               1:1.2-3    programmable completion for the ba

Versions of packages bash suggests:
pn  bash-doc                      <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to