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 07:12:05 -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>
- User-agent: Mutt/1.4.2.1i
On Wed, Dec 29, 2004 at 11:50:51PM +0900, Edward Wright wrote: > I don't know how to make prinf output the byte values. It'll ouput the > hex representation no problem.... > > I tried using it to create the above mentioned file like so: > > printf $'\x26\x9d\x00\x00\x28\x9d\x00\x00' >testfile Why try so hard? Why not just use echo? :) [~] echo -n $'\x26\x9d\x00\x00\x28\x9d\x00\x00' | od -t x1 0000000 26 9d 00 00 28 9d 00 00 0000010 :) [~] > but I ended up with a 2 byte file.... apparently it quit when it hit > the null byte.... which kinda makes sense. Yeah, that's because, I suppose, printf is just a wrapper around the C function call, which (natch) uses C strings. > (I tried the same thing as an argument to grep, but it also > failed - probly for the same reason) That kinda surprises me, and I'd say it's probably worth a bug report to the GNU grep folks. --Dave
- Follow-Ups:
- Re: [tlug] binary search of binary data
- From: Edward Wright
- 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
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