ControlTier > core
 

contains

Command Reference

Description

Checks if file contains pattern

The contains command reads content of the specified file looking for any string that matches the specified pattern. If the file contains content matching the pattern the string "true" is printed otherwise "false". If the -failonfalse flag is set, then the command will exit with an error.

The contains command takes a -maxwait option that will wait that will cause the command to continuously retry the check until the maximum wait time has been exceeded.

static: This command can be run outside of an object context.

Usage

ctl -m textutil -c contains [-checkevery <500>] [-failonfalse] -file <> [-maxwait <>] [-maxwaitunit <second>] -pattern <>

Options

Option Description Type Default
checkevery The amount of time to wait between each test of the conditions.

Defaults to 500 checkeveryunits.

string 500
failonfalse fail if pattern not found in file boolean
file file name string
maxwait The maximum amount of time to wait. string
maxwaitunit The unit of time that must be used to interpret the value of the maxwait attribute.

Allowed values for maxwaitunit: millisecond, second, minute, hour, day, week

string second
pattern text pattern

Pattern is a regular expression.

string