Source:
<code>public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception { try (final PrintFile printFile = getOutputFile(cl)) { final String tableName = OptUtil.getTableOpt(cl, shellState); if (cl.getArgList().isEmpty()) { throw new MissingArgumentException("No terms specified"); } final Class<? extends Formatter> formatter = getFormatter(cl, tableName, shellState); final ScanInterpreter interpeter = getInterpreter(cl, tableName, shellState); int numThreads = 20; if (cl.hasOption(numThreadsOpt.getOpt())) { numThreads = Integer.parseInt(cl.getOptionValue(numThreadsOpt.getOpt())); } boolean negate = false; if (cl.hasOption(negateOpt.getOpt())) { negate = true; } <START> <END> String profileName = ""; if (cl.hasOption(profileNameOpt.getOpt())) { profileName = cl.getOptionValue(profileNameOpt.getOpt()); } final Authorizations auths = getAuths(cl, shellState); final BatchScanner scanner = shellState.getAccumuloClient().createBatchScanner(tableName, auths, numThreads); scanner.setRanges(Collections.singletonList(getRange(cl, interpeter))); scanner.setTimeout(getTimeout(cl), TimeUnit.MILLISECONDS); setupSampling(tableName, cl, shellState, scanner); for (int i = 0; i < cl.getArgs().length; i++) { setUpIterator(Integer.MAX_VALUE - cl.getArgs().length + i, "grep" + i, cl.getArgs()[i], scanner, cl, negate, shellState, profileName); } try { fetchColumns(cl, scanner, interpeter); final FormatterConfig config = new FormatterConfig(); config.setPrintTimestamps(cl.hasOption(timestampOpt.getOpt())); printRecords(cl, shellState, config, scanner, formatter, printFile); } finally { scanner.close(); } } return 0; }</code><technical_language>super class ScanCommand a protected method called addScanIterators(). I completely sure, I able call setup profile iters. If so, changes needed for this class</technical_language>

Target:
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception { try (final PrintFile printFile = getOutputFile(cl)) { final String tableName = OptUtil.getTableOpt(cl, shellState); if (cl.getArgList().isEmpty()) { throw new MissingArgumentException("No terms specified"); } final Class<? extends Formatter> formatter = getFormatter(cl, tableName, shellState); final ScanInterpreter interpeter = getInterpreter(cl, tableName, shellState); int numThreads = 20; if (cl.hasOption(numThreadsOpt.getOpt())) { numThreads = Integer.parseInt(cl.getOptionValue(numThreadsOpt.getOpt())); } boolean negate = false; if (cl.hasOption(negateOpt.getOpt())) { negate = true; } final Authorizations auths = getAuths(cl, shellState); final BatchScanner scanner = shellState.getAccumuloClient().createBatchScanner(tableName, auths, numThreads); scanner.setRanges(Collections.singletonList(getRange(cl, interpeter))); scanner.setTimeout(getTimeout(cl), TimeUnit.MILLISECONDS); setupSampling(tableName, cl, shellState, scanner); addScanIterators(shellState, cl, scanner, ""); for (int i = 0; i < cl.getArgs().length; i++) { setUpIterator(Integer.MAX_VALUE - cl.getArgs().length + i, "grep" + i, cl.getArgs()[i], scanner, cl, negate); } try { fetchColumns(cl, scanner, interpeter); final FormatterConfig config = new FormatterConfig(); config.setPrintTimestamps(cl.hasOption(timestampOpt.getOpt())); printRecords(cl, shellState, config, scanner, formatter, printFile); } finally { scanner.close(); } } return 0; }