bug#22045: expr substr returns with an error code 1 when the substring starts with 0

2015-11-28 Thread Matthias Klose
found with coreutils-8.23, expr substr returns with an error code when the substring consists of only '0' characters, and the match is started at position 1. $ expr substr 1234 3 4; echo $? 0012 0 $ expr substr 1234 1 2; echo $? 12 0 $ expr substr 1234 1 2; echo $? 00 1 $ expr substr

bug#22045: expr substr returns with an error code 1 when the substring starts with 0

2015-11-28 Thread Pádraig Brady
tag 22045 notabug close 22045 stop On 28/11/15 20:47, Matthias Klose wrote: > found with coreutils-8.23, expr substr returns with an error code when the > substring consists of only '0' characters, and the match is started at > position 1. > > $ expr substr 1234 3 4; echo $? > 0012 > 0 > $

bug#22045: expr substr returns with an error code 1 when the substring starts with 0

2015-11-28 Thread Assaf Gordon
tag 22045 notabug close 22045 stop Hello, On 11/28/2015 03:47 PM, Matthias Klose wrote: found with coreutils-8.23, expr substr returns with an error code when the substring consists of only '0' characters, and the match is started at position 1. $ expr substr 1234 1 4; echo $? 1