Re: IFS is ignored for nested functions with stdin redirection

2012-12-03 Thread Andrey Borzenkov
В Sun, 02 Dec 2012 22:33:14 -0500 Chet Ramey пишет: > On 12/2/12 11:52 AM, Andrey Borzenkov wrote: > > I hit this problem in DKMS code and could reduce it to the following > > example: > > Thanks for the report. The problem has to do with state in the process > substitution subshell preventing

Re: IFS is ignored for nested functions with stdin redirection

2012-12-02 Thread Chet Ramey
On 12/2/12 11:52 AM, Andrey Borzenkov wrote: > I hit this problem in DKMS code and could reduce it to the following > example: Thanks for the report. The problem has to do with state in the process substitution subshell preventing it from using the temporary environment for variable lookups. It

Re: IFS is ignored for nested functions with stdin redirection

2012-12-02 Thread Andrey Borzenkov
В Sun, 2 Dec 2012 20:52:00 +0400 Andrey Borzenkov пишет: > I hit this problem in DKMS code and could reduce it to the following > example: > > == > #!/bin/bash > > oifs=$IFS > > inner () { > echo a/b/c/d > exit 0 > } > > outer() { > for i in 1; do > IFS=/ read m v k a <

IFS is ignored for nested functions with stdin redirection

2012-12-02 Thread Andrey Borzenkov
I hit this problem in DKMS code and could reduce it to the following example: == #!/bin/bash oifs=$IFS inner () { echo a/b/c/d exit 0 } outer() { for i in 1; do IFS=/ read m v k a < <(IFS=$oifs inner) echo $m:$v:$k:$a done } outer for j in 1; do IFS=: read