grep

  • Version 4.0 and earlier: grep() function not available.
  • Version 5.0 and later: grep() function available.

Description

The grep() function runs the policy server host’s grep command using the provided arguments and files, and returns the result as a string.

Not supported in Endpoint Privilege Management for Linux (EPM-L).

Syntax

grep ([grep-arguments, ] search-pattern, filename-or-template [, filename-ortemplate …]);

Arguments

grep-arguments Optional. Switch arguments to the policy server host’s grep command. Refer to the policy server host’s grep documentation for specifics.
search-pattern Required. The regular expression to search for.
filename-or-template Required. A file name, possibly with wildcards, to search for the search-pattern.

Return Values

A string containing the output of grep.

result = grep ("-w", "word", "filename");
result = grep ("pattern", "manynames*");

For more information, see the following: