def METHOD_NAME(infile, outfile):
    inf = open(infile, "r")
    outf = open(outfile, "w")
    if grass.find_program("sort", "-n"):
        grass.run_command("sort", flags="n", stdin=inf, stdout=outf)
    else:
        # FIXME: we need a large-file sorting function
        grass.warning(_("'sort' not found: sorting in memory"))
        lines = inf.readlines()
        for i in range(len(lines)):
            lines[i] = float(lines[i].rstrip("\r\n"))
        lines.sort()
        for line in lines:
            outf.write(str(line) + "\n")
    inf.close()
    outf.close()