[Bug 1381567] Re: Bash returns unexpected character \001 on string operation

Launchpad Bug Tracker 1381567 at bugs.launchpad.net
Wed May 13 22:14:43 UTC 2015


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: bash (Ubuntu)
       Status: New => Confirmed

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

Title:
  Bash returns unexpected character \001 on string operation

Status in bash package in Ubuntu:
  Confirmed

Bug description:
  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?!

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



More information about the foundations-bugs mailing list