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 PROTECTED]:~/tmp5$ printf 'hello\000there' | { while read -0 ; do echo
> $REPLY; done; }
read -d $'\0' will do most of what you want, with one limitation. The
read builtin accepts only one eol delimiter, so either you ensure that
the input ends with a NUL or you pick up the final portion of the input
in $REPLY after read returns status 1 upon encountering EOF.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong. No day but today.
Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/
_______________________________________________
Bug-bash mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-bash