Re: Variables can’t contain NUL

2018-06-20 Thread Clark Wang
On Wed, Jun 20, 2018 at 10:22 PM, George wrote: > > Personally I do think some method of handling arbitrary binary data in the > shell would be a welcome addition (and I think zsh provides that - don't > remember if ksh does) > Ksh93 has "typeset -b" which defines vars for binary data (actually

Re: Variables can’t contain NUL

2018-06-20 Thread George
On Sun, 2018-05-20 at 04:56 +0200, Garreau, Alexandre wrote: > On 2015-11-13 at 07:17, Greg Wooledge wrote: > Actually in the most general case, where those output streams may > contain NUL bytes, it requires two temp files, because you can't store > arbitrary data streams in bash variables at all.

Re: Variables can’t contain NUL

2018-05-24 Thread L A Walsh
Chet Ramey wrote: On 5/21/18 8:37 AM, Greg Wooledge wrote: If you're looking for some deeper answer, like "Why did Stephen Bourne write it this way back in 1977?" then I would hazard a guess along the lines of "It is tightly coupled to the underlying C argument-passing interface which uses

Re: Variables can’t contain NUL

2018-05-21 Thread Chet Ramey
On 5/21/18 8:37 AM, Greg Wooledge wrote: > If you're looking for some deeper answer, like "Why did Stephen Bourne > write it this way back in 1977?" then I would hazard a guess along the > lines of "It is tightly coupled to the underlying C argument-passing > interface which uses NUL-terminated st

Re: Variables can’t contain NUL

2018-05-21 Thread Greg Wooledge
On Sun, May 20, 2018 at 04:56:48AM +0200, Garreau, Alexandre wrote: > On 2015-11-13 at 07:17, Greg Wooledge wrote: > > Actually in the most general case, where those output streams may > > contain NUL bytes, it requires two temp files, because you can't store > > arbitrary data streams in bash vari