LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-17-2004, 10:17 AM   #1
Thorkyl
LQ Newbie
 
Registered: Nov 2003
Distribution: Suse 9.0
Posts: 20

Rep: Reputation: 0
Question 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


TIA
Thorkyl
 
Old 06-17-2004, 10:41 AM   #2
nukkel
Member
 
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
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.
 
Old 06-17-2004, 11:33 AM   #3
Thorkyl
LQ Newbie
 
Registered: Nov 2003
Distribution: Suse 9.0
Posts: 20

Original Poster
Rep: Reputation: 0
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.

Thorkyl
 
Old 06-17-2004, 12:38 PM   #4
nukkel
Member
 
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
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 www.linux.org they have a large list of linux apps sorted by category

Anyone else reading this know of editors capable of saving CRLF?
 
Old 06-18-2004, 10:17 PM   #5
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
For reading Unix/Mac text files on Windows I've always relied on UltraEdit, since it automatically converts to DOS format.
 
Old 06-28-2004, 04:53 PM   #6
Thorkyl
LQ Newbie
 
Registered: Nov 2003
Distribution: Suse 9.0
Posts: 20

Original Poster
Rep: Reputation: 0
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

Thorkyl
 
Old 06-28-2004, 05:13 PM   #7
Cohobin
Member
 
Registered: Feb 2003
Posts: 51

Rep: Reputation: 15
in kwrite, under tools-> end of line you can set what type of end of line specification to use... use the second DOS/windows.
 
Old 06-28-2004, 05:42 PM   #8
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding carriage returns Zxarr Programming 7 09-20-2005 05:44 AM
How to remove carriage returns in a bunch of perl scripts? rebel Red Hat 4 04-12-2005 02:27 PM
XDrawString and carriage returns jpbarto Programming 1 03-25-2004 03:07 PM
Kword: How to remove carriage returns? RockyRed Linux - Newbie 1 07-21-2003 06:52 AM
Carriage Returns Trouble sancho5 Linux - General 2 08-29-2001 08:59 PM


All times are GMT -5. The time now is 06:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration