Syntax
string subst ( string str, string pattern, string replacement )
Description
subst substitutes part of a string with another string.
Example
print(subst("xxxonexxx","one","two"));
Returns: "xxxtwoxxx"
string subst ( string str, string pattern, string replacement )
subst substitutes part of a string with another string.
print(subst("xxxonexxx","one","two"));
Returns: "xxxtwoxxx"
string substr ( string str, int start, int length )
substr returns the substring of a given length starting at a given position in the string.
printf("%s\n",substr ("xxxfooxxx",3,3))
Returns "foo".
printf(%s\n",substr (xxxfooxxx",3,-1))
-1 returns the remainder of the string, "fooxxx".
These are the built-in user information functions available to use within the pmpolicy file.
Name | Description |
---|---|
getfullname | Get a user’s full name from the policy server. |
getgroup | Get a user’s primary group from the policy server. |
getgroups | Get the list of groups for a user from the policy server. |
gethome | Get a user’s home directory from the policy server. |
Get a user’s login shell from the policy server. |
string getfullname ( string user )
getfullname returns the specified user’s full name from the policy server (or from the client host if getpasswordfromrun is set to yes in the policy server's pm.settings file). When called without arguments, the function reports the full name for the user name present inside the runuser variable.
# print the fullname of root on the policy server print(getfullname("root"));
© ALL RIGHTS RESERVED. 이용 약관 개인정보 보호정책 Cookie Preference Center