On Sun, 2004-07-18 at 15:08, lorian@... 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
<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
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.