Re: [ILUG] silly shell thing

From: Peter Heslin (Peter.Heslin at domain ucd.ie)
Date: Wed 24 May 2000 - 15:31:48 IST


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 domain linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> List maintainer: listmaster at domain linux.ie



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:16 GMT