i need to sort a csv file by the first column, which is a timestamp. I've been trying to do this with the following code, but the inputstream of the process p is always just blank:
Process p = Runtime.getRuntime().exec("sort -k1,1 -t, Bucket_Stats.csv");
p.waitFor();
// read this file into InputStream
InputStream in = p.getInputStream();
OutputStream output = new FileOutputStream("Sorted_Bucket_Stats.csv");
System.out.println(IOUtils.copy(in,output));
output.flush();
output.close();
-oflag of thesortcommand?