import sys
import re

def takeKey(elem):
	value = re.search('\d{1,}', elem[0])
	if value!=None:
		value = value.group(0)
	else:
		value=0
	return int(value)

fileName = sys.argv[-2]
outputFileName = sys.argv[-1]
if outputFileName==None:
	outputFileName=fileName+"_sort"
file = open(fileName, "r")
fileWrite = open(outputFileName, "w")
text =file.read()
file.close()
textSplit = text.split("\n")
listKeyValue = []
for kv in textSplit:
	listKeyValue += [kv.split(";")]
listKeyValue.sort(key=takeKey)
for el in listKeyValue:
	try:
		fileWrite.write(el[0]+";"+el[1]+"\n")
	except Exception as e:
		print("empty\n")	
fileWrite.close()
a504ea6c380be15bf59e6a73e182eb6271fbf29c
<mask token>

<mask token>


def takeKey(elem):
    value = re.search('\\d{1,}', elem[0])
    if value != None:
        value = value.group(0)
    else:
        value = 0
    return int(value)


<mask token>
if outputFileName == None:
    outputFileName = fileName + '_sort'
<mask token>
file.close()
<mask token>
for kv in textSplit:
    listKeyValue += [kv.split(';')]
listKeyValue.sort(key=takeKey)
for el in listKeyValue:
    try:
        fileWrite.write(el[0] + ';' + el[1] + '\n')
    except Exception as e:
        print('empty\n')
fileWrite.close()

<mask token>


def takeKey(elem):
    value = re.search('\\d{1,}', elem[0])
    if value != None:
        value = value.group(0)
    else:
        value = 0
    return int(value)


fileName = sys.argv[-2]
outputFileName = sys.argv[-1]
if outputFileName == None:
    outputFileName = fileName + '_sort'
file = open(fileName, 'r')
fileWrite = open(outputFileName, 'w')
text = file.read()
file.close()
textSplit = text.split('\n')
listKeyValue = []
for kv in textSplit:
    listKeyValue += [kv.split(';')]
listKeyValue.sort(key=takeKey)
for el in listKeyValue:
    try:
        fileWrite.write(el[0] + ';' + el[1] + '\n')
    except Exception as e:
        print('empty\n')
fileWrite.close()

import sys
import re


def takeKey(elem):
    value = re.search('\\d{1,}', elem[0])
    if value != None:
        value = value.group(0)
    else:
        value = 0
    return int(value)


fileName = sys.argv[-2]
outputFileName = sys.argv[-1]
if outputFileName == None:
    outputFileName = fileName + '_sort'
file = open(fileName, 'r')
fileWrite = open(outputFileName, 'w')
text = file.read()
file.close()
textSplit = text.split('\n')
listKeyValue = []
for kv in textSplit:
    listKeyValue += [kv.split(';')]
listKeyValue.sort(key=takeKey)
for el in listKeyValue:
    try:
        fileWrite.write(el[0] + ';' + el[1] + '\n')
    except Exception as e:
        print('empty\n')
fileWrite.close()

import sys
import re

def takeKey(elem):
	value = re.search('\d{1,}', elem[0])
	if value!=None:
		value = value.group(0)
	else:
		value=0
	return int(value)

fileName = sys.argv[-2]
outputFileName = sys.argv[-1]
if outputFileName==None:
	outputFileName=fileName+"_sort"
file = open(fileName, "r")
fileWrite = open(outputFileName, "w")
text =file.read()
file.close()
textSplit = text.split("\n")
listKeyValue = []
for kv in textSplit:
	listKeyValue += [kv.split(";")]
listKeyValue.sort(key=takeKey)
for el in listKeyValue:
	try:
		fileWrite.write(el[0]+";"+el[1]+"\n")
	except Exception as e:
		print("empty\n")	
fileWrite.close()