#!/usr/bin/env python

__author__ = "Randall J. Radmer"
__version__ = "1.0"
__doc__ = """Reads a file, then *over writes* it using the current OS's line terminator:
* LF:    Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others
* CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS
* CR:    Commodore machines, Apple II family, Mac OS up to version 9 and OS-9
"""

import sys

filename=sys.argv[1]

lines=[]
fIn=open(filename)
for line in fIn:
    lines.append(line.rstrip())
fIn.close()

fOut=open(filename, 'w')
for line in lines:
    fOut.write('%s\n' % line)
fOut.close()

