Editing dev box from Windows adds odd characters Editing dev box from Windows adds odd characters unix unix

Editing dev box from Windows adds odd characters


How do I ensure that the transition between Windows to UNIX code editing goes more smoothly?

You need to use a Windows editor that can read and write files with UNIX end of line markers.

Check you editor options to see if it can be configured to do this and if it can't just find another editor.

When I need to do this on Windows I use the Zeus editor.


Your question may not be complete but I will try to answer anyway.If by nasty characters you mean ^M at the end of the file, then the problem is with the CR LF characters that are at the end of Windows lines. Unix lines ends only with LF, so you can see the ^M still in Unix.

This extra character may mess some unix programs, and I see two workarounds for you:

a) Use a Windows editor that will not corrupt your file (notepad++, editplus2, etc.)

b) use the "dos2unix" command in Unix in order to remove the extra character from your Unix file.

You can also see if this really you problem by viewing your file with cat: cat -v "yourFile"