!7 p { File in = new File("/home/stefan/dev/ip-to-country.csv"); long last = 0; new StringBuilder buf; for (S s : linesFromReader(utf8BufferedReader(in))) { L l = tok_splitAtComma_unquote(s); if (l(l) < 3) continue; long start = ipToInt(first(l)); S country = last(l); S line = (start-last) + " " + country; print(line); buf.append(line + "\n"); last = start; } File out = new File(f2s(in) + ".short.gz"); saveGZTextFile(out, str(buf)); }