Re: Linux vs win32 emacs

Dave Pawson <[email protected]> Sun, 18 Jul 2004 16:48:26 +0100
Newsgroups gmane.emacs.psgml.user
Message-ID <1090165706.2018.65.camel@homer>
On Sun, 2004-07-18 at 15:08, [email protected] wrote:
>   > > I'm having great trouble moving scripts over from windows
>   > > to Linux.
> 
> You should give an example here. What kind of 'scripts' are you
> referring to?

win32 batch files, to linux shell scripts.

> 
>   > > OK with command differences, but its something to do with line
>   > > endings?
> 
> It may, but need not be a problem.
> 
>   > > Any way I can 'see' line endings /convert them or something
>   > > in Linux please?  At least to see where the problem is!
> 
> Sound like you are migrating to Linux. A rock-solid way to actually
> see line endings is use hexl-mode: A mere newline is 0a, a CRLF is
> 0d0a.

<grin/> I knew emacs could do it! Tks.

> 
> But as I said, it NEED not be a problem. Emacs, for one, handles
> different line endings (as long as they are consistent in a given
> file), and will simply display "(DOS)" in the modeline when you look
> at a DOS file. I guess it simply depends on the application whether it
> can handle alien line ends (also true conversely: Notepad will diplay
> Unix files all in one line, with odd squares where the line breaks
> ought to be, while Windows/DOS 'more' will display the lines
> correctly).

But does it have the 'convert' functionality?
I can see the 'dos' in the lhs corner.

> 
>   > However, I typically do this with a command-line Perl script when I
>   > need to convert from Macintosh linends to Unix linends:
>   >   perl -pe's/\r/\n/g;' in-with-Mac-eols > out-with-Unix-eols
>   > Can't be too difficult to figure out the Windows equivalent.
>   > (s/\r\n/\n/g; or maybe s/\r\f/\n/g;?)
> 
> The former. But this approach is only transparent if such a command
> line script is run under *nix.

Which is what I want.
I.e. I've moved them to Linux.
Now want to 'convert' them.


-- 
Regards DaveP.
XSLT&Docbook  FAQ
http://www.dpawson.co.uk/xsl




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click