Chat now with support
Chat with Support

Privilege Manager for Unix 6.1.1 - Administration Guide for Unix

One Identity Privileged Access Suite for Unix Introducing Privilege Manager for Unix Planning Deployment Installation and Configuration Upgrade Privilege Manager for Unix System Administration Managing Security Policy The Privilege Manager for Unix Security Policy Advanced Privilege Manager for Unix Configuration Administering Log and Keystroke Files InTrust Plug-in for Privilege Manager Troubleshooting Privilege Manager for Unix Policy File Components Privilege Manager Variables Privilege Manager for Unix Flow Control Statements Privilege Manager for Unix Built-in Functions and Procedures Privilege Manager programs Installation Packages

match

Syntax
int match( string regularexpr, string str )
Description

match compares a string to a regular expression.

Returns true if a match is found; otherwise, false.

Example
# check if user begins with j and ends with t… 
if (match("^j.*t$", user) ) { 
   … 
}

strindex

Syntax
int strindex( string str, string substr )
Description

strindex returns the numerical offset of a given string within another string. If the substr is not found, it returns -1.

Example
printf("%d\n",strindex("xxxfooxxx","foo"));

Returns: "3"

printf("%d\n",strindex("xxxfooxxx","bar"));

Returns: "-1"

Related Topics

strlen

strlen

Syntax
int strlen( string str )
Description

strlen returns the length of the string, str.

Example
printf("%d\n",strlen("foo"));

Returns: 3

Related Topics

strindex

strsub

Syntax
string strsub ( string str, int start, int length )
Description

strsub returns the substring of a given length starting at a given position in the string.

Example
printf("%s\n",strsub("xxxfooxxx",3,3))

Returns "foo".

printf(%s\n",strsub(xxxfooxxx",3,-1))

-1 returns the remainder of the string, "fooxxx".

Related Documents