LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG-Webdev] FW: Question About Double Spacing

[ILUG-Webdev] FW: Question About Double Spacing

Niall O Broin niall at linux.ie
Fri Dec 5 09:44:56 GMT 2003


On Friday 05 December 2003 09:15, adam beecher wrote:
> For some reason an extra linefeed or line break got introduced into some
> pages in a clients site, anyone got any suggestions for how to get rid of
> em? I'm guessing I should be using something like sed, but I have no idea
> how. Here's a couple of pages with the problem:

perl -0777 -pi -e 's/\r\n\r\n/\r\n/g' <FILENAME>


will do what you want. It's left as an exercise for the reader to decide how 
to apply this to a lot of files, but it's a piece of cake.

It's left as a further exercise for the curious reader to find out what this 
is doing - man perlrun will help.

Perhaps if you avoid cruddy Windows tools you'll avoid this problem in the 
future.

-- 
Niall




More information about the Webdev mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell