Public bug reported:

There has been some change between Precise and Trusty that lets this code 
snippet behave differently:

Precise:
$ unset f ; f=abcd ; first_char=${f[@]:0:1} ; echo $first_char
a

Trusty
$ unset f ; f=abcd ; first_char=${f[@]:0:1} ; echo $first_char
\001


The solution is to use ${f:0:1} but nevertheless the result on Trusty seems 
completely wrong. Where does the \001 even come from?!

** Affects: bash (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: trusty

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1381567

Title:
  Bash returns unexpected character \001 on string operation

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1381567/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to