LinuxQuestions.org
Visit Jeremy's Blog.
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 01-29-2008, 12:11 AM   #1
Teasdale
Member
 
Registered: Dec 2007
Location: USA
Distribution: Ubuntu 8.04
Posts: 35

Rep: Reputation: 15
Word Processor That Finds/Replaces Undisplayed Characters (like Line Breaks)?


I'm looking for a word processor that can find and replace line breaks.

I frequently download etexts from Project Gutenburg and I paste them in MSWord and replace the line breaks (^p) while saving the paragraph breaks (^p^p). I've searched the internet, and OpenOffice won't do that - if it does it at all, it's an autoformat option, and I'd rather set it up myself.

I've read a little about AbiWord and KWord, but it doesn't look like they do that, either.

Does anyone know of a Linux program that does that?
 
Old 01-29-2008, 05:27 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
I don't know about word processor, but you can probably use tr or dos2unix from the command line.
 
Old 01-29-2008, 07:29 PM   #3
Teasdale
Member
 
Registered: Dec 2007
Location: USA
Distribution: Ubuntu 8.04
Posts: 35

Original Poster
Rep: Reputation: 15
I'm not sure what you mean - unless you mean opening Ubuntu's terminal/console and pasting the text I want to reformat in there and then typing in that command - and that can't be it.

In my search, I actually found a program online that does it - you paste the text into a box and the program removes the line breaks and then you copy/paste it to your own text editor. It's here - it does exactly what I want to do, but surely there's a Linux text editor or program that can do that without having to paste text online??
 
Old 01-30-2008, 01:27 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,045

Rep: Reputation: Disabled
"man dos2unix"

Kate does it. Somewhere in the menu (tools) is an entry which lets you chose the coding of the end of the line. No need to do it by hand with search / replace.
 
Old 01-30-2008, 01:05 PM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
If you mind the CLI, you could also write a sed script to process the file(s).

If you need help w/ that, post a short sample, preferably in a "Code:" block.
 
Old 01-30-2008, 03:43 PM   #6
Teasdale
Member
 
Registered: Dec 2007
Location: USA
Distribution: Ubuntu 8.04
Posts: 35

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by JZL240I-U View Post
"man dos2unix"
I type this in by running an external command from the text editor program? How/where do I do that? It doesn't make sense to type this into Ubuntu's terminal/console, right?
 
Old 01-30-2008, 03:47 PM   #7
Teasdale
Member
 
Registered: Dec 2007
Location: USA
Distribution: Ubuntu 8.04
Posts: 35

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by archtoad6 View Post
If you mind the CLI, you could also write a sed script to process the file(s).

If you need help w/ that, post a short sample, preferably in a "Code:" block.
I'm sorry, but I have no idea what you just said. I don't know what CLI means, or sed or "Code:" block. When I figure it out (starting with this page that I found), I'll get back to you.
 
Old 01-30-2008, 03:47 PM   #8
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by Teasdale View Post
I type this in by running an external command from the text editor program? How/where do I do that? It doesn't make sense to type this into Ubuntu's terminal/console, right?
dos2unix is a command line tool to convert documents from dos standard end of line characters to unix standard end of line characters. So opening a terminal and typing man dos2unix will open the manpage for dos2unix. manpages typically tell you how to use a command on the command line and what arguments you may feed them. So you would basically specify the input file you want converted and the output file.
 
Old 01-30-2008, 03:49 PM   #9
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by Teasdale View Post
I'm sorry, but I have no idea what you just said. I don't know what CLI means, or sed or "Code:" block. When I figure it out (starting with this page that I found), I'll get back to you.
CLI is short for command line interface.

Sed is a tool to manipulate text in files.

When you type a response here at LQ.org, you can insert a block of text that's formatted differently and starts with "Code:". Most people use it to paste code here. In the advanced reply editor, it's the "#" button.
 
Old 01-30-2008, 04:34 PM   #10
Teasdale
Member
 
Registered: Dec 2007
Location: USA
Distribution: Ubuntu 8.04
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks for your patience - I tried to open kwrite in my terminal and found out that kate is kwrite! So that was one mystery solved. I've installed it and will play around with it and read over all the suggestions posted here and figure this out.
 
Old 01-31-2008, 02:03 AM   #11
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,045

Rep: Reputation: Disabled
Actually Kate is not Kwrite, they just use partly the same code.

I'd suggest you use Kate if you have installed KDE (it is the K advanced text editor, after all) since it has a lot of powerful features in particular for scripts and programming and the like.

Sorry, if my hint to use "man" was too short, most members here know what it is but pljvaldez explained it beautifully.

Last edited by JZL240I-U; 01-31-2008 at 02:04 AM.
 
Old 01-31-2008, 09:09 AM   #12
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Teasdale,
My apologies for the seeming gibberish.

pljvaldez,
My thanks for the clear explanation.
 
  


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
[BASH] How to filter characters away? !{param#word} {param%word}! Dark Carnival Programming 8 03-17-2005 01:49 PM
irssi in konsole only replaces last line (Mandrake 10.0) marenkiapina Linux - Software 2 05-18-2004 02:21 PM
Fast Word Processor? SuSE_User Linux - Software 5 02-02-2004 12:06 PM
Best word processor? kdaru Linux - Software 14 06-11-2002 07:00 AM
Word processor msammer Linux - Newbie 2 01-29-2002 05:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:39 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration