Re: read Built-in Parameter Behavior -- Null Byte Delimiter

2016-01-16 Thread Martijn Dekker
Adam Danischewski schreef op 16-01-16 om 20:28: > Yet if we look for the null byte: bash, like most UNIX shells, cannot store or handle null bytes. (zsh is the only exception I know of.) > $> while IFS= read -r -d'' a; do echo "got $a"; done < <(find . -type f > -print0) > *

Re: read Built-in Parameter Behavior -- Null Byte Delimiter

2016-01-16 Thread Piotr Grzybowski
hi, On Sat, Jan 16, 2016 at 8:28 PM, Adam Danischewski wrote: > .. > Yet if we look for the null byte: > $> while IFS= read -r -d'' a; do echo "got $a"; done < <(find . -type f > -print0) >returns nothing this is because it is the same as: read -r -d a; I think there

read Built-in Parameter Behavior -- Null Byte Delimiter

2016-01-16 Thread Adam Danischewski
It seems the parameter for the delimiter for the read built-in behaves differently for the NULL case, and it is a very useful case. I found this after a difficult to track down bug appeared in some of my code, so I thought I would pass it on to you. If it is expected behavior I didn't see it in t