Re: Substring Expansion doesn't respect IFS when using in Heredoc

2022-09-02 Thread Chet Ramey
On 9/1/22 12:54 PM, Aloxaf Yin wrote: Hello, I encountered something strange when using bash. It seems like a bug so someone suggested that I ask here. Here is the test code. declare -a arr=(12 34 56 78 90) IFS=',' cat <<<"${arr[*]:0}" cat < It does seem strange. Here-doc

Re: Substring Expansion doesn't respect IFS when using in Heredoc

2022-09-01 Thread Aloxaf Yin
Someone in stackoverflow reminded me that this bug didn't exist before 5.0, so I did a bisect and the result shows that the bug was first introduced in 057a9fbd. BTW, the question link is https://stackoverflow.com/questions/73571977 Aloxaf Yin 于2022年9月2日周五 00:54写道: > > Hello, I encountered somet

Substring Expansion doesn't respect IFS when using in Heredoc

2022-09-01 Thread Aloxaf Yin
Hello, I encountered something strange when using bash. It seems like a bug so someone suggested that I ask here. Here is the test code. declare -a arr=(12 34 56 78 90) IFS=',' cat <<<"${arr[*]:0}" cat <