Mailing List Archive

Support open source code!


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

tlug: sed help



Michael Casinghino writes:

 > I have a file that is using ^M for line delimitification.  How can I
 > replace these with LF's?

Chris Sekiya writes:

 > No sed.
 > 
 > cat file | tr \\015 \\012 > newfile

Peter Linsley writes:

 > Here is a sed solution:
 > 
 >      sed 's/.$//'

Good, simple answers which I can't improve on. Gets a little more
complicated if you have to do CRLF (DOS) to LF (Unix). If you have a
continuing need for this sort of thing, you might have a look at my
webpage <http://unnamable.home.ml.org/crunch/textconv.html>, where
I've collected several text conversion methods.

Chris, Peter: if it's alright with you, I'd like to add your methods
to my page ... properly attributed, of course -- or not, if you
prefer.

Matt Gushee
Oshamanbe, Hokkaido
----------------------------------------------------------------
Next Technical Meeting: 12 December, 12:30 *** place TBA ***
IMPORTANT: TLUG is looking for a venue for the next meeting
if you could host in your university or office, please contact us
Next Nomikai: 15 January 1999, 19:30 Tengu TokyoEkiMae 03-3275-3691
----------------------------------------------------------------
more info: http://tlug.linux.or.jp Sponsors: PHT, HSBC Securities


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links