Unix systems use line endings \n, while on Windows it uses \r\n, and mac uses \r. You cannot detect the file system, since it does not matter. I can use \ n on Windows if my editor supports it, for example. This is just the standard for these OSs, not a requirement.
- , , , - \n a\r, , \r, \n, .
, . :