Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 7 of 7

This is a discussion on ASCII File Format: MSDOS or Linux? in the Shared & Semi-Dedicated forum
This might sound silly, but I released a PHP-Nuke 'add-on' the other night, and as I was building the distro, it got me thinking... MSDOS ...

  1. #1
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775

    Question ASCII File Format: MSDOS or Linux?

    This might sound silly, but I released a PHP-Nuke 'add-on' the other night, and as I was building the distro, it got me thinking...

    MSDOS (or Windows) formatted ASCII files traditionally have CR/LF (carriage return/line feed) pairs for line delimiters, but Unix formatted files usually have LF's (line feeds) to terminate each line. So, what I do is format the program files in Unix format, since most ppl are running on *nux servers, but for the docs and changelogs, et cetera, I use MSDOS/Windows format. That makes it easier to view the 'readme' files using Notepad or whatever.

    Any thoughts on this? What does everyone else do?
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  2. #2
    Administrator Eric's Avatar
    Join Date
    Sep 2001
    Posts
    853
    If creating your scripts in Windows and you need to throw them at Linux, use a little tool called "dos2unix". Files can be converted from CR/LF to CR.
    Eric E. [eric@jaguarpc.com]
    Jaguar Technologies, LLC
    JaguarPC.com * DedicatedSpace.com

  3. #3
    Old Hillbilly Connie's Avatar
    Join Date
    Sep 2001
    Location
    Hills of Missouri
    Posts
    2,646
    Originally posted by Eric_Echter
    If creating your scripts in Windows and you need to throw them at Linux, use a little tool called "dos2unix". Files can be converted from CR/LF to CR.
    Where do you find this little tool?

    Forum Moderators - Jag Staff

    Spam Whackers Blog - Dedicated to fighting Spam and providing General SEO Tips
    Organize your Kitchen or purchase Kitchen Accessories at Condells
    Ihelpyou Forum - Dedicated to "Best Practices" SEO

  4. #4
    Jag Veteran
    Join Date
    Sep 2002
    Posts
    650
    Originally posted by Eric_Echter
    If creating your scripts in Windows and you need to throw them at Linux, use a little tool called "dos2unix". Files can be converted from CR/LF to CR.
    Either that or using ASCII mode for FTP file transfers.

  5. #5
    Jag Veteran
    Join Date
    Sep 2002
    Posts
    650
    Originally posted by clssam


    Where do you find this little tool?
    It should be available in your SSH account. If not, ask support to install it, I am sure they will not have a problem with that.

    There are similar tools for DOS/Windows environment too, but I can't help you much with that beside mentioning Cygwin(http://www.cygwin.com/), which would be overkill.

    EDITED:

    And of course, any decent editor can do UNIX-to-DOS, DOS-to-UNIX conversions.

  6. #6
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Originally posted by gerilya
    ...any decent editor can do UNIX-to-DOS, DOS-to-UNIX conversions.
    My editor of choice is Winsyntax. If you decide to use it, be aware that you WILL be completely UNDERwhelmed the first few times you use it. It's as simple to use as Notepad. However, it's powerful enough to satisfy a "PHP Oracle" like myself, as I'm referred to on other sites...
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  7. #7
    Jag Veteran
    Join Date
    Sep 2002
    Posts
    650
    Thanks, but I am pretty conservative when it comes to the new software Besides, I visited their site at http://www.winsyntax.com/ and didn't find any mention of highlighting for C/C++ nor Perl.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •