Syntax
string osname( )
Description
osname returns an internal string representation of the operating system on the policy server, such as aix43-rs6k, linux-x86_64.
Example
printf("Policy server is running on OS:%s\n", osname());
string osname( )
osname returns an internal string representation of the operating system on the policy server, such as aix43-rs6k, linux-x86_64.
printf("Policy server is running on OS:%s\n", osname());
string quote( string str [, string esc[, string surrounding_string]] )
The quote function puts the specified string between quotation marks. It inserts the "\" (backslash) character as required to "quote" any occurrences of the characters in the second argument to indicate that they are taken literally. The string is surrounded by a "surrounding_string" and defaults to the value of esc, which is optional and defaults to the value of the specified escape character. The quote function is useful when parsing arguments into commands which are shell scripts. The default escape character is a single quote.
#this function will return: [This won\'t fail.] quote("This won't fail.", "'");
int rand(int max )
rand returns a random number less than the specified maximum.
# print a random item from a list print(alist[rand(length(alist)]);
list stat ( string fn )
stat returns information about a specified file on the policy server.
If the file fn exists on the policy server, stat returns the following list of values:
File size in bytes
File owner as username
File group as groupname
File permissions as octal
File change date in the format: YYYY/MM/DD
File change time in the format: HH:MM:SS
File change time in the format: seconds since the epoch
File access date in the format: YYYY/MM/DD
File access time in the format: HH:MM:SS
File access time in the format: seconds since the epoch
File modification date in the format: YYYY/MM/DD
File modification time in the format: HH:MM:SS
File modification time in the format: seconds since the epoch
File inode number
© 2024 One Identity LLC. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center