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] silly shell thing

[ILUG] silly shell thing

Peter Heslin Peter.Heslin at ucd.ie
Wed May 24 15:31:48 IST 2000


On Wed, May 24, 2000 at 02:43:25PM +0100, John P. Looney (Kate) wrote:
> On Wed, May 24, 2000 at 01:58:45PM +0100, Noel Carroll mentioned:
> > Better still, have a look at the file in a hex editor.  That'll tell you
> > quick enough whats there or isn't as the case may be.
> 
>  The "od" command is a lot handier than a hexeditor, and it's on every
> unix machine around ;)
> 
> Kate

For the problem as originally stated:

perl -0777 -pe 's/\n\n/\n/g' test.txt

If, as has been suggested, your newlines have turned into something
more diabolical, then you can replace \n\n in the above with whatever
record separator you really do have.  This can also be expressed in
octal if you prefer: \012\012, or whatever you discover the separator to
be.

Peter

> 
> -- 
> "The fool must be beaten with a stick, for an intelligent person 
> the merest hint is sufficient"                -- Zen Master Greg
> 
> -- 
> Irish Linux Users' Group: ilug at linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> List maintainer: listmaster at linux.ie




More information about the ILUG 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