docs: private static int grep(final HBaseClient client,
                            final byte[] table,
                            final boolean ignorecase,
                            final String[] args) {
      final Scanner scanner = client.newScanner(table);
      scanner.setMaxNumRows(1024);
      String regexp;
      scanner.setFamily(CliUtils.ID_FAMILY);
      if (args.length == 3) {
        scanner.setQualifier(CliUtils.toBytes(args[1]));
        regexp = args[2];
      } else {
        regexp = args[1];
      }
      if (ignorecase) {
        regexp = "(?i)" + regexp;
      }
      scanner.setKeyRegexp(regexp, CliUtils.CHARSET);
      boolean found = false;
      try {
        ArrayList<ArrayList<KeyValue>> rows;
        while ((rows = scanner.nextRows().joinUninterruptibly()) != null) {
          for (final ArrayList<KeyValue> row : rows) {
            found |= printResult(row, CliUtils.ID_FAMILY, true);
          }
        }
      } catch (HBaseException e) {
        LOG.error("Error while scanning HBase, scanner=" + scanner, e);
        throw e;
      } catch (Exception e) {
        LOG.error("WTF?  Unexpected exception type, scanner=" + scanner, e);
        throw new AssertionError("Should never happen");
      }
      return found ? 0 : 1;
    }