Skip to content

Instantly share code, notes, and snippets.

@mactanxin
Created May 18, 2010 07:35
Show Gist options
  • Save mactanxin/404735 to your computer and use it in GitHub Desktop.
Save mactanxin/404735 to your computer and use it in GitHub Desktop.
# -*- coding:utf-8-*-
from __future__ import with_statement
import sys
def sortu(filename):
with open(filename) as f:
x = open(targetfile,"w")
for j in list(set([i.strip() for i in f])) :
print >> x,j
x.close()
if __name__ == '__main__':
filename = sys.argv[1]
targetfile = sys.argv[2]
sortu(filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment