Can you see any of the output from ack when you run it in Eclipse? Do you get an error message?
String line = "ack 11290013 UIM.csv";
CommandLine cmdLine = CommandLine.parse(line);
DefaultExecutor executor = new DefaultExecutor();
executor.setWorkingDirectory(new File("/Users/davidevichi/csvkit_tutorial/"));
int exitValue = executor.execute(cmdLine, procEnv);
System.out.println("Process exit code: " + exitValue);
My first thought, without knowing anything else, is that somehow you have your PATH different between Eclipse and your shell. Or, it could be PERL5LIB, and ack can’t find the standard libraries.
Map<String, String> procEnv = EnvironmentUtils.getProcEnvironment();
procEnv.put("PATH", "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin");
What if you just run “ack -h”, where it doesn’t do anything but show a help screen?
--
You received this message because you are subscribed to the Google Groups "ack users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ack-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ack-users/93AC687F-E2F6-4529-BC43-B8114AE89EC9%40petdance.com.
On Apr 25, 2021, at 9:45 AM, Mike Kelly <mrmicha...@gmail.com> wrote:Have you tried using grep? I bet you could build a grep pipeline into sed or cut that would give you in Java just what you want from that CSV line.
--
You received this message because you are subscribed to the Google Groups "ack users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ack-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ack-users/07A771D1-4EDE-4832-9515-014CC15CF66C%40petdance.com.
On Apr 26, 2021, at 1:27 AM, Davide Vichi <davide...@engynya.com> wrote:grep and also csvgrep (from csvkit) for this huge file in the worst case (the pattern is present in the last line) spents 35 secs.ack spents only 2,5 seconds!