Re: filter a binary file and reduce 0x150a to 0x15

2010-10-20 Thread andrew clarke
On Tue 2010-10-19 21:21:00 UTC-0400, Karl Vogel (vogelke+u...@pobox.com) wrote: me% perl -0pe 's/\025\n/\025/g;' blah | od -c Nitpicking a little, but Perl isn't part of the FreeBSD base any more. Most FreeBSD users probably have it installed, though (perhaps as a dependency)...

filter a binary file and reduce 0x150a to 0x15

2010-10-19 Thread Matthias Apitz
Hello, Before I programm it in C (or whatever), is there any normal shell tool to filter a (large) binary file and change any occurance of 0x150a to 0x15 (i.e. delete \n but only if it follows a char 0x15)? Thanks matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m

Re: filter a binary file and reduce 0x150a to 0x15

2010-10-19 Thread Matthias Apitz
El día Tuesday, October 19, 2010 a las 09:24:34AM -0400, Jerry McAllister escribió: On Tue, Oct 19, 2010 at 03:08:45PM +0200, Matthias Apitz wrote: Hello, Before I programm it in C (or whatever), is there any normal shell tool to filter a (large) binary file and change any

Re: filter a binary file and reduce 0x150a to 0x15

2010-10-19 Thread Matthias Apitz
El día Wednesday, October 20, 2010 a las 12:36:44AM +1100, andrew clarke escribió: I'd be personally more comfortable doing it in C or Python but I think you can do this with tr -s. me too; Note: 0x15 == 25 octal; 0x0a == 12 octal. I don't recall if it's possible to use hex values in

Re: filter a binary file and reduce 0x150a to 0x15

2010-10-19 Thread Jerry McAllister
On Tue, Oct 19, 2010 at 03:08:45PM +0200, Matthias Apitz wrote: Hello, Before I programm it in C (or whatever), is there any normal shell tool to filter a (large) binary file and change any occurance of 0x150a to 0x15 (i.e. delete \n but only if it follows a char 0x15)? Can you manage it

Re: filter a binary file and reduce 0x150a to 0x15

2010-10-19 Thread andrew clarke
On Tue 2010-10-19 15:08:45 UTC+0200, Matthias Apitz (g...@unixarea.de) wrote: Before I programm it in C (or whatever), is there any normal shell tool to filter a (large) binary file and change any occurance of 0x150a to 0x15 (i.e. delete \n but only if it follows a char 0x15)? I'd be

Re: filter a binary file and reduce 0x150a to 0x15

2010-10-19 Thread Karl Vogel
On Tue, 19 Oct 2010 15:08:45 +0200, Matthias Apitz g...@unixarea.de said: M Before I programm it in C (or whatever), is there any normal shell tool M to filter a (large) binary file and change any occurance of 0x150a to M 0x15 (i.e. delete \n but only if it follows a char 0x15)? This seems