grep

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

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

grep ([grep-arguments, ] search-pattern, filename-or-template [, filename-ortemplate …]);
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.

A string containing the output of grep.

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

For more information, please see the following: