How to run commands with sudo that are returned from Eval scripts in patternsDescription<!-- div.margin{ padding: 10px 40px 40px 30px; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } ul{ list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> Description Restricting find commands to run using sudo can fail in some patterns that use commands returned from scripts that run without appending sudo. Example Pattern: Tomcat war Connection: Connectivity to Relational Database Systems Step: 1.4. Find "jdbc" in all files for specific app It executes: EVAL(return ctx.getCommandManager().scanDirectoriesForPattern(ctx,java.util.Collections.singletonList(${install_directory}),"jdbc:"); ) which runs: find /apps/bmc/ARSystem/midtier -type f | xargs grep 'jdbc:' 2>/dev/null Solution To run the example with sudo, add a new step as opposed to using the eval script. "sudo find" + $install_directory + " -type f | xargs grep '" + "jdbc:" + "' 2>/dev/null"