Chet Ramey wrote:
"Nathan Coulter" <[EMAIL PROTECTED]> writes:
read -d $'\0' will do most of what you want, with one limitation. The
This is actually equivalent to read -d ''.
So, to recap, the way to read null-delimited data is:
printf 'hello\0there' | { while read
> "Nathan Coulter" <[EMAIL PROTECTED]> writes:
>
> >> read -d $'\0' will do most of what you want, with one limitation. The
>
>
> This is actually equivalent to read -d ''.
Yes, it is, but it makes the point more clearly.
Chet
--
``The lyf so short, the craft so long to le
"Nathan Coulter" <[EMAIL PROTECTED]> writes:
>> read -d $'\0' will do most of what you want, with one limitation. The
This is actually equivalent to read -d ''.
> This doesn't seem be available in my version. Is it a newer feature?
>
> $bash --version
> GNU bash, version 2.0
> From: Chet Ramey <[EMAIL PROTECTED]>
> Subject: Re: read command and ascii null as delimiter
> Sent: 2006-09-08 08:49
>
> Nathan Coulter wrote:
> > Feature request: an option, maybe "-0" to use ascii null as the delimiter
> for the "re
Nathan Coulter wrote:
> Feature request: an option, maybe "-0" to use ascii null as the delimiter for
> the "read" command. It would make the following two commands produce the
> same output:
>
> [EMAIL PROTECTED]:~/tmp5$ printf 'hello\000there' | xargs -n1 -0 echo
> hello
> there
>
> [EMAIL P