convert newlines UNIX - DOS / DOS to UNIX

convert newlines UNIX - DOS / DOS to UNIX

Post by onedbgur » Mon, 17 Jan 2011 08:43:38



If he were a programmer type, he could also find the C sources for
DOS2UNIX.c and UNIX2DOS.c and create an external procedure that does
the work for him without trying to re-invent the wheel...

Just a thought...
 
 
 

convert newlines UNIX - DOS / DOS to UNIX

Post by John Hurle » Mon, 17 Jan 2011 10:45:53

Mladen:

#t Let me try and take a shot: you would need to replace \n\r (DOS
standard) with \n (Unix standard). You mentioned Oracle 10g, which
supports regular expressions. That shouldn't be very hard to do.

Why do it inside a database call what the operating systems provide
already?

 
 
 

convert newlines UNIX - DOS / DOS to UNIX

Post by Mladen Gog » Tue, 18 Jan 2011 02:23:26


Because that's what he asked about. I agree with you, I normally don't do
it within the database.



--
http://www.yqcomputer.com/
 
 
 

convert newlines UNIX - DOS / DOS to UNIX

Post by onedbgur » Wed, 19 Jan 2011 07:11:46


Exactly. I also agree with you Mladen. What he should really be
doing is to trim this sort of thing before ever storing it in the
database. However, for every "should be" there are many other "but in
THIS case..."

Sometimes ya just can't win.