-   Linux - Software (
-   -   Carriage Returns (

Thorkyl 06-17-2004 10:17 AM

Carriage Returns
Ok here is the mess I have.

I have text file that I create in my SuSE box.
I open it on a windows machine and there are no carriage returns.

what I create in SuSE is:
row 1 data
row 2 data
row 3 data

what I get in windows is
row 1 datarow 2 datarow 3 data

I am using kwrite to create the file.

How can I get kwrite to either use the windows format of CrLf and not the Linux format

or just convert it to a windows format


nukkel 06-17-2004 10:41 AM

Try wordpad instead of notepad in windoze?

Or install the unix2dos and dos2unix conversion programs

Most unix editor will have an option to save in the dos CRLF format, don't know about kwrite though.

Thorkyl 06-17-2004 11:33 AM

Ok will investigate your sugestion this evening.

You mentioned other editors.
What ones would you recomend other than kwrite and vi (need to leard it but fighting the urge).

I actually use TextPad in windows and wold love to use somthing like in my suse box.


nukkel 06-17-2004 12:38 PM

Well, everyone pretty much has his/her fave editor they get kind of attached to over time... :) Personally I use nano, it is capable of saving to dos format... But it's an editor for in the shell -- so non-gui. Anyway I'm not really "up to speed" on the existing choise of editors since i'm quite content with nano. But surely there must be dozens available. Maybe try they have a large list of linux apps sorted by category ;)

Anyone else reading this know of editors capable of saving CRLF?

mikshaw 06-18-2004 10:17 PM

For reading Unix/Mac text files on Windows I've always relied on UltraEdit, since it automatically converts to DOS format.

Thorkyl 06-28-2004 04:53 PM

Well what I wound up doing was parsing the files with VB and converting them that way
as it turned out I had over 3,000 files to convert.
I was originally told it 1 file with 3 million rows

However I am interested to hear other input on this.

I kinda like kwrite on suse and TextPad in Winbloz


Cohobin 06-28-2004 05:13 PM

in kwrite, under tools-> end of line you can set what type of end of line specification to use... use the second DOS/windows.

whansard 06-28-2004 05:42 PM

unix2dos and dos2unix. they used to be standard.
sed would work well also. i forget how sed wants you to specify newline, but it would be similar to this
sed s/"\012"/"\012\015"/g < unixtext > dostext
that's not right, but it's close.

All times are GMT -5. The time now is 07:14 AM.