Operating Systems :: Unix :: unix2dos |
|||
| By: Bernard |
Date: 16/04/2006 09:22:40 |
Points: 20 | Status: Answered Quality : Excellent |
|
Hello, When I create a script file, it always displays with an extra blank line after each line, if I open it in a Windows-based text editor. Someone said that I could enter: unix2dos filename_unix_format new file_dos_format The goal is that the file will look nice in Notepad. When I telnet into my java box, what do I enter to convert the filename to DOS format ? |
|||
| By: VGR | Date: 16/04/2006 09:26:13 | Type : Answer |
|
| hello, it's true that there is a unix2dos() external command in some shells, and to check whether you've it in the path type : unix2dos [CR] to check that it is present but out of the $path, type : whereis unix2dos [CR] or (depending on distro) locate unix2dos [CR] if those fail miserably, you can resort to slow but efficient "find" command : find / -name unix2dos -print Also, note that running those commands as "root" does give you higher chances to find the command. Else, you'll see a lot of "access denied" erros for subdirectories of "/". Now, if you don't find the unix2dos script on your system, you can play with "sed" to replace [CRLF] with [LF] The best solution IMHO is to use a Windows text editor able to prevent single LF end of line markers. I can think of two : - Wordpad (not Notepad) - NoteTab Light - UltraEdit or other overkill monsters (syntax highlighting, etc) The two last ones can even convert enf-of-lines between systems or keep the original file format. This last option is definitely the best for you. regards |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








