[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