This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to delete line feed

Tags: None
(comma "," separated)
tzenda
Registered Member
Posts
1
Karma
0

How to delete line feed

Mon Sep 10, 2012 6:33 pm
In Words or Kword, how does one find and/or delete a line feed. I need to delete all of the line feeds in my document. I've tried searching on \r, \n, ^M without success. Any help would be appreciated.

Thanks,
tzenda
paultabolinsky
Registered Member
Posts
4
Karma
0

Re: How to delete line feed

Mon Sep 10, 2012 8:10 pm
I used to use the old standard Unix text editor "ed" I believe is still included with all BASH. You can find usage in older books by Kernighan and Pike. A very useful and well written: "The UNIX Programming Environment". a command something like: /$/s///g which says search for end of line then substitute what was shearched for with nothing but do this globally for the entire file. Line endings differ for M$ and Unix; I''m using memory but it's close so test it on a small temp throw away file. Oh, don't forget to wq that is write and quit the work when finished.
You can also escape " \ " the enter key using the keyboard but don't forget the ending "/ " :>)
Paul T.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: How to delete line feed

Sun Sep 23, 2012 1:42 am
Not sure if KWord uses the same interface as Kate does, but if it does, then you may need to set the search mode to "Regular expression" before \r,\n,etc will match.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot]