Koozali.org: home of the SME Server
		Legacy Forums => General Discussion (Legacy) => Topic started by: HB on September 22, 2002, 12:37:58 AM
		
			
			- 
				dos2unix is not on my e-smith
 
 But I'm guessing there's an alternative to it - I just can't find it.
 
 Thx!
- 
				perl -pe 's/\cM//'
 
 tr -d '\015'
 
 sed 's/^V^M//'   # that's control-V followed by control-M
 
 :-)
 
 Out of curiosity, how are the DOS-line-ended files getting to the server in
 the first place? (If you're using FTP, transferrin them in ASCII mode instead
 of BINARY mode will take care of the conversion for you.)
 
 --Rich
- 
				Thanx!
 
 I had a vague memory of the tr cmd - I better start getting into sed (and perl)! :-)
 
 I'm pretty comfortable using emacs. But since there's no emacs on my box - I have the choice of vi, pico and emacs-from-my-windoze-box.
 I don't know pico and can't stand vi - so I'm stuck with the windoze solution.
 
 Would _love_ to get _real_ emacs on my box though... later...
 
 You're so cool!
 
 ;-)
- 
				Why not?  There is a Win32 GNU port of emacs for windows:
 
 http://www.gnu.org/software/emacs/windows/faq2.html#getting-emacs
 
 Or more specifically:
 http://ftp.gnu.org/gnu/windows/emacs/21.2/
 
 Hope this helped,
 Nathan
- 
				> I'm pretty comfortable using emacs. But since there's no emacs on my box - I
 > have the choice of vi, pico and emacs-from-my-windoze-box.
 
 Tsk, that won't do!
 
 :) richl@allspice$ cat /etc/e-smith-release
 Mitel Networks SME Server V5.5
 :) richl@allspice$ rpm -qa | grep emacs
 emacs-nox-20.7-34
 emacs-20.7-34
 
 I took those from a Red Hat 7.1 cd, IIRC. They're on rpmfind.net if nothing
 else. Newer ones might even work if you want emacs 21. We've got our share of
 emacs users around here. :-)
 
 Cheers,
 --Rich
- 
				Very cool!
 
 A billion thanks to you Rich!
 
 I've got an ok X-server on the windoze box (winaxe) and to me the win32 emacs is only a pseudo solution.
 
 I actaully feared that installing emacs would lead me into another rpm dependency hell - so I never bothered. I will attempt it now, once I get connection to rpmfind.net...
 
 "I'll be back"    ;-)
 
 Holger
- 
				Note that those two emacs RPMs give you what Red Hat calls "emacs-nox",
 the terminal-only emacs. Once you involve X you'll get into that dependency
 hell you mentioned :-)
 
 Cheers,
 --Rich
- 
				If you still want a dos2unix, then you can download this perl implementation.
 It is a single, small perl script.
 
 DOS <-> Unix text Converter
 
 http://www.ftls.org/en/examples/perl-tools/d2u-u2d.shtml
 
 It gives you a new command d2u-u2d which converts both ways.
 
 Ian
- 
				Wow!
 
 Thanks guys - you've been really helpful.
 
 I've got emacs-nox running now, which is really great. (I've run into the usual backspace-delete hell now, but I'll get past that...).
 
 And I'll check out the perl utility too.
 
 Thanks again!     :-)
 
 Holger