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 ;)
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
> "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
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!