<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main():
 """ NAME convert2unix.py DESCRIPTION converts mac or dos formatted file to unix file in place SYNTAX convert2unix.py FILE OPTIONS -h prints help and quits """

    if '-h' in sys.argv:
        print(main.__doc__)
        sys.exit()
    file=sys.argv[1]
    f=open(file,'r')
    Input=f.readlines()
    f.close()
    out=open(file,'w')
    for line in Input:
        out.write(line)
    out.close()