// returns file with program output (STDOUT+STDERR) static File backtickToConsole_lineBuf(S cmd, fO onLine) { O onOutput = new O { new LinesBuffer buf; void get(S s) { buf.append(fixNewLines(s)); for (S line : buf.getAndClearCompleteLines()) pcallF(onLine, line); } }; ret backtickToConsoleX(cmd, onOutput); }