Created On: 11 May 2011
Problem:
In troubleshooting Server Express issues that occur in a UNIX/Linux environment, customers are often asked to provide COBOL programs for testing. Those programs are commonly temporarily downloaded from Pivotal and saved onto a support technician's Windows machine before being transported to a Unix or Linux system for testing. Many times, when those files are opened in a Unix or Linux editor (such as vi) on the testing machine, the files are seen to have a Windows Carriage-Return Line-Feed character (^M) appended to the ends of the lines of text. How can these be removed without using UNIX/Linux tools such as sed, vi or vim?
Resolution:
Do this using a copy of the file in question on the Windows system:
(Note: The resolution depends on the Microsoft Visual Studio application being already installed on the technician's Windows machine).
- on the Windows machine, in Windows Explorer, right-click on the document
- in the menu which then appears,select "Open With".
- in the list of choices which next appears, select "Microsoft Visual Studio".
- once the file opens, save it using "Advanced Save Options...".
- when the "Advanced Save Options" dialog box appears, select the Drop Down
menu under "Line Endings" and choose Unix/LF.
The file can then be transported to the destination */nix machine (being sure to replace any previous copies of it) for further work without its containing the nuisance ^M character.
(Note: The resolution depends on the Microsoft Visual Studio application being already installed on the technician's Windows machine).
- on the Windows machine, in Windows Explorer, right-click on the document
- in the menu which then appears,select "Open With".
- in the list of choices which next appears, select "Microsoft Visual Studio".
- once the file opens, save it using "Advanced Save Options...".
- when the "Advanced Save Options" dialog box appears, select the Drop Down
menu under "Line Endings" and choose Unix/LF.
The file can then be transported to the destination */nix machine (being sure to replace any previous copies of it) for further work without its containing the nuisance ^M character.
Old KB# 34083



