@@ -0,0 +1,898 @@
+package com.yutax77.java8_ans.chap9;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Apublic class Ans11 %7B%0A    public static int grep() throws IOException, InterruptedException %7B%0A        String homeDir = System.getProperty(%22user.home%22);%0A        ProcessBuilder builder = new ProcessBuilder(%0A                                        %22grep%22,%0A                                        %22-r%22, // recursive%0A                                        %22-s%22, // no-messages%0A                                        %22-I%22, // ignore binary files%0A                                        %22-E%22, // extended-regexp%0A                                        %22%5C%5Cb(?:%5C%5Cd%5B -%5D*?)%7B13,16%7D%5C%5Cb%22,%0A                                        homeDir);%0A        File out = new File(%22output.txt%22);%0A        builder.redirectError(out).redirectOutput(out);%0A        Process process = builder.start();%0A        return process.waitFor();%0A    %7D%0A%7D%0A

Answer chap.9-11