Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] binary search of binary data
- Date: Wed, 29 Dec 2004 08:31:26 -0800
- From: Dave Brown <dagbrown@example.com>
- Subject: Re: [tlug] binary search of binary data
- References: <20041225205936.GA2199@example.com> <87llbjj4xw.fsf@example.com> <20041227145652.GC2199@example.com> <87fz1rhy0m.fsf@example.com> <20041228041814.GD2199@example.com> <871xd9hezi.fsf@example.com> <20041229145051.GE2199@example.com> <20041229151205.GA24615@example.com> <20041229154308.GG2199@example.com> <20041229155248.GA24770@example.com>
- User-agent: Mutt/1.4.2.1i
On Wed, Dec 29, 2004 at 07:52:48AM -0800, Dave Brown wrote: > I just verified it with my bash-3.00 and it does, indeed, > truncate. I just sent in a bug report to the bash folks about > this--I think that's incorrect behaviour. To which I got this reply: dagbrown@example.com wrote: > Description: > $'(string1)\x00(string2)' truncates the string at \x00. The execve() interface underlying the invocation of all external commands uses \x00 to indicate the end of a string. There's no way around it for external commands. bash could handle builtins differently, but that inconsistency could lead to trouble. Consider: var=... out=`/bin/echo "$var"` test "$var" = "$out" You would expect this test to always exit 0, but if var could contain null characters, and if the internal test command could see those, then the test would fail. I guess the bash guys want bash builtins to mimic all of the arbitrary limitations of external commands, despite not being bound by such limitations. Interesting way of looking at things. (I wonder if bash's builtins should also mimic execve()'s argument-length limit in order to conceal the fact that builtins are actually builtins, not external commands.) --Dave
- Follow-Ups:
- Re: [tlug] binary search of binary data
- From: Edward Wright
- Re: [tlug] binary search of binary data
- From: Stephen J. Turnbull
- References:
- [tlug] binary search of binary data
- From: Edward Wright
- Re: [tlug] binary search of binary data
- From: Stephen J. Turnbull
- Re: [tlug] binary search of binary data
- From: Edward Wright
- Re: [tlug] binary search of binary data
- From: Stephen J. Turnbull
- Re: [tlug] binary search of binary data
- From: Edward Wright
- Re: [tlug] binary search of binary data
- From: Stephen J. Turnbull
- Re: [tlug] binary search of binary data
- From: Edward Wright
- Re: [tlug] binary search of binary data
- From: Dave Brown
- Re: [tlug] binary search of binary data
- From: Edward Wright
- Re: [tlug] binary search of binary data
- From: Dave Brown
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] binary search of binary data
- Next by Date: Re: [tlug] binary search of binary data
- Previous by thread: Re: [tlug] binary search of binary data
- Next by thread: Re: [tlug] binary search of binary data
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links