[CS-FSLUG] An easy way to remove blank lines?

Ed Hurst ehurst at asisaid.com
Fri Sep 9 11:53:34 CDT 2005


On Fri, 9 Sep 2005, Jukka wrote:

> Hi!
> 
> I may have asked this already some time ago, but could someone tell me
> an easy way to remove blank lines from html-document? A regular
> expression to be used with text editors "replace"-function...or maybe
> a shell script?

I seem to recall a blank line is defined as two "end-of-line" codes in
succession. In Unix/Linux land, that's usually represented by "\n" for
the "newline" code. Depending on the editor you use, there may be a
different code. For shell scripting, I am almost totally ignorant. The
way I saw it done in the old days of WordPerfect macros was to search
for any pair of newlines and replace with one.

-- 
Ed Hurst
-----------
Applied Bible -- http://users.tconline.net/~softedges/
Plain & Simple Computer Help -- http://ed.asisaid.com/
Plain Package blog -- http://ed.asisaid.com/blog/





More information about the Christiansource mailing list