Mailing List Archive

Support open source code!


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

Re: tlug: sed help



Scott Stone writes:

 > On Fri, 4 Dec 1998, Michael Casinghino wrote:

 > > I have a file that is using ^M for line delimitification. 

 > Really all you need to do is get rid of the ^Ms.  there should already be
 > linefeeds in there.  there's a program called 'dos2unix' which was
 > designed for this special case, 

When I downloaded 'dos2unix' a few months ago, I found it was an a.out 
binary (got rid of all a.out support over a year ago, so I couldn't
run it); source code was nowhere in sight. Which is why I wrote a Tcl
script to do the job, sent it in to the Linux Gazette, got several
interesting counter-proposals, and decided to put them all together on 
the Web for posterity.

 > but if you want to use sed, I think:
 > 
 > (sed 's/\r//g' file > file.new;mv -f file.new file)

Mind if I suck up this one, too?

Matt Gushee
Oshamanbe, Hokkaido
------------------------------------------------------------------
Next Technical Meeting: 12 December, 12:30 at Temple Univ. Japan
*NEW LOCATION* a map is available at http://www.tuj.ac.jp/maps.html
Next Nomikai: 15 January 1999, 19:30 Tengu TokyoEkiMae 03-3275-3691
------------------------------------------------------------------
more info: http://tlug.linux.or.jp                     Sponsor: PHT


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links