12-15-07 06:21 PM
Begin <7f7cd19a-14d2-4a22-a2f1-f8ac2f3f2602@l32g2000hse.googlegroups.com>
On Sat, 15 Dec 2007 08:08:39 -0800 (PST), PowerOne <salazar.willy@gmail.com> wrote:
> I need to replace a char into a DAT FILE with '0A' using C under Unix
> system. I have a list of .dat file to do this work and I want to open
> the file search for 0D and replace it with 0D 0A (HEX) and go for the
> next file.
If it is truly a data file, then inserting as you describe but not as
you said you wanted to do, will likely break the file. If it is a text
file after all, then there already exist tools to do that. unix2dos
comes to mind.
If it is homework, then figuring out how to do it is part of the excercise.
--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
This message was originally posted on Usenet in plain text.
Any other representation, additions, or changes do not have my
consent and may be a violation of international copyright law.
[ Post a follow-up to this message ]
|