Syntax
string basename ( string pathname )
Description
basename returns the filename portion of a pathname. It does not check that either the filename or path exist.
Example
print(basename("/var/adm/pm.log"));
Returns: "pm.log"
string basename ( string pathname )
basename returns the filename portion of a pathname. It does not check that either the filename or path exist.
print(basename("/var/adm/pm.log"));
Returns: "pm.log"
int comparehosts(hoststring, hostpattern)
comparehosts checks whether a host string (either host name or IP string) matches a host definition, which could be a host name (such as, host1.a.b.com), IP address (such as, 10.10.10.1), netgroup (such as, @mygroup1), host pattern (such as, *.a.b.com) or IP address (such as, 10.10.10.*).
This function honors the value of short names defined in pm.settings when resolving host names.
Returns 1 if a match is found, 0 if no match is found.
if (comparehosts(submithost,"*.a.b.com")) { ... }
int datecmp(date1, date2)
datecmp compares the two dates, which must be in the format YYYY/MM/DD or YY/MM/DD (in which case 2000 is added to the year).
This function returns these values:
if (datecmp(startdate, enddate) >=0) { reject “startdate must be before enddate”; }
string dirname ( string pathname )
dirname returns the directory portion of a pathname. It does not check that the filename or path exist.
print(dirname("/var/adm/pmlog"));
Returns: "/var/adm"
© 2024 One Identity LLC. ALL RIGHTS RESERVED. Términos de uso Privacidad Cookie Preference Center