I have a small project (editing lyx files which contain the special characters of East European languages) for which the only valid solution seemes to be using a binary editor. Indeed, while these files contain only ASCII characters, the lyx method of handling such characters - similar to the TeX one, but with a decisive difference - is to insert CR characters in the word. This excludes find-and-replace operations with a more conventional editor. So, I need a binary editor with excellent find-and-replace capabilities. Any suggestion is welcome. -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
At 14:36 30/06/00, you wrote:
I have a small project (editing lyx files which contain the special characters of East European languages) for which the only valid solution seemes to be using a binary editor. Indeed, while these files contain only ASCII characters, the lyx method of handling such characters - similar to the TeX one, but with a decisive difference - is to insert CR characters in the word. This excludes find-and-replace operations with a more conventional editor. So, I need a binary editor with excellent find-and-replace capabilities. Any suggestion is welcome.
If I am interpreting things right, you should try Perl. It has excellent on the fly, massive, regex capable search and replace capabilities. For instance, to change all the hex codes '00AA' to '00BB' of the binary file somefile.bin, one would do: perl -pi -e 's/0x00AA/0xBB/g' somefile.bin Looks like this is easily done for textfiles with special character sets also. If your requirements are above your Perl comprehension, check with the guys from comp.lang.perl.* They have been always very helpful to me. HTH. Koos Pol ---------------------------------------------------------------------- S.C. Pol T: +31 20 3116122 Systems Administrator F: +31 20 3116200 Compuware Europe B.V. E: koos_pol@nl.compuware.com Amsterdam PGP public key available -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Thank you for your very useful suggestion. The reason I did not answer yet is that I had to dig a little bit. The syntax of the statement needs somewhat different escape sequences. I found them in the "Perl 5 Desktop Reference" (O'Reilly), page 4. For your example it is: perl -pi -e 's/\xAA/\xBB/g' somefile.bin It works, now I am building a lexical collection adequate for my needs. On Fri, Jun 30, 2000 at 04:07:29PM +0200, Koos Pol wrote:
At 14:36 30/06/00, you wrote:
I have a small project (editing lyx files which contain the special characters of East European languages) for which the only valid solution seemes to be using a binary editor. Indeed, while these files contain only ASCII characters, the lyx method of handling such characters - similar to the TeX one, but with a decisive difference - is to insert CR characters in the word. This excludes find-and-replace operations with a more conventional editor. So, I need a binary editor with excellent find-and-replace capabilities. Any suggestion is welcome.
If I am interpreting things right, you should try Perl. It has excellent on the fly, massive, regex capable search and replace capabilities. For instance, to change all the hex codes '00AA' to '00BB' of the binary file somefile.bin, one would do:
perl -pi -e 's/0x00AA/0xBB/g' somefile.bin
Looks like this is easily done for textfiles with special character sets also. If your requirements are above your Perl comprehension, check with the guys from comp.lang.perl.* They have been always very helpful to me.
HTH. Koos Pol ---------------------------------------------------------------------- S.C. Pol T: +31 20 3116122 Systems Administrator F: +31 20 3116200 Compuware Europe B.V. E: koos_pol@nl.compuware.com Amsterdam PGP public key available
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Andrei Mircea wrote:
I have a small project (editing lyx files which contain the special characters of East European languages) for which the only valid solution seemes to be using a binary editor. Indeed, while these files contain only ASCII characters, the lyx method of handling such characters - similar to the TeX one, but with a decisive difference - is to insert CR characters in the word. This excludes find-and-replace operations with a more conventional editor. So, I need a binary editor with excellent find-and-replace capabilities. Any suggestion is welcome.
man grep -- This Email is 100% Virus Free! How do I know? Because no Microsoft products were used to generate it! Regards Don Hansford ECKYTECH COMPUTING SuSE Linux 6.4 -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Andrei Mircea wrote:
I have a small project (editing lyx files which contain the special characters of East European languages) for which the only valid solution seemes to be using a binary editor. Indeed, while these files contain only ASCII characters, the lyx method of handling such characters - similar to the TeX one, but with a decisive difference - is to insert CR characters in the word. This excludes find-and-replace operations with a more conventional editor. So, I need a binary editor with excellent find-and-replace capabilities. Any suggestion is welcome.
orry, hit something(?) and it seems the mail got sent straight away! I meant to say that if grep can handle your local language requirements, then look at man grep This Email is 100% Virus Free! How do I know? Because no Microsoft products were used to generate it! Regards Don Hansford ECKYTECH COMPUTING SuSE Linux 6.4 -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
participants (3)
-
donh@halenet.com.au
-
koos.pol@nl.compuware.com
-
mircea.andrei@wanadoo.fr