public static void main(String[] args) {
        if (args.length > 1 && args[0].equals("-test")) {
            try {
            System.out.println(toSingleLine(args[1]));
            } catch(IOException e) {
                e.printStackTrace();
            }
        } else {
            if (args == null || args.length == 0) {
                System.out.println("No command specified.");
                return;
            }
            StringBuffer command = new StringBuffer();
            for (int i = 0; i < args.length; ++i) {
                command.append(args[i]);
                command.append(" ");
            }
            CommandFilter filter = new CommandFilter();
            filter.setArguments(command.toString());
            filter.connectInput(System.in);
            filter.connectOutput(System.out);
            filter.start();
        }
    }