String os = System.getProperty("os.name"); if (!(os.equals("Linux") || (os.equals("SunOS")))) { GLMDebug.ERROR("fileSort()", "Uses unix sort, Not a unix system."); return false; } String command = "sort "+keys+" "+input_file+" -o "+output_file+" -T /tmp";  try { Runtime rt = Runtime.getRuntime(); Process sort = rt.exec(command); sort.waitFor(); } catch (Exception ie) { GLMDebug.ERROR("fileSort()", "Sorting InterruptedException: " + ie); return false; } return true;
String os = System.getProperty("os.name"); if (!(os.equals("Linux") || (os.equals("SunOS")))) { if (logger.isErrorEnabled()) { logger.error("fileSort()" + "Uses unix sort, Not a unix system."); } return false; } String command = "sort " + keys + " " + input_file + " -o " + output_file + " -T /tmp"; try { Runtime rt = Runtime.getRuntime(); Process sort = rt.exec(command); sort.waitFor(); } catch (Exception ie) { if (logger.isErrorEnabled()) { logger.error("fileSort()" + "Sorting InterruptedException: " + ie); } return false; } return true;
    public static boolean sortFile(String input_file, String output_file, String keys) {	// Warning: uses a unix sort	String os = System.getProperty("os.name");	if (!(os.equals("Linux") || (os.equals("SunOS")))) {	    GLMDebug.ERROR("fileSort()", "Uses unix sort, Not a unix system.");	    return false;	}	String command = "sort "+keys+" "+input_file+" -o "+output_file+" -T /tmp";// 	GLMDebug.DEBUG("fileSort()", "sort command:"+command);	try {	    Runtime rt = Runtime.getRuntime();	    Process sort = rt.exec(command);	    sort.waitFor();	} catch (Exception ie) {	    GLMDebug.ERROR("fileSort()", "Sorting InterruptedException: " + ie);	    return false;	}	return true;    }