Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RE: sed/vi how to concatenate all non-empty lines?



> Thanks. :)
> 
> I've opened the output file in vi but it causes vi to behave strangely, i.e. 
> I can't cursor down a line or even do a ctrl-f to go down a page. I also 
> have a bunch of ^M all over the place.

There are a whole bunch of ways to fix this, but the simplest is

col output.txt > fixed_output.txt

> I guess this is caused by the fact that it's an MS-DOS file? the CR/LF is 
> causing a problem? But when I open the original file in vi I don't see any 
> ^M though  . . .

Your vi clone is probably auto-detecting the DOS end-of-line. sed tends to
be not as smart.




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links