Sun Directory Services 3.1 Administration Guide

split Function

The syntax of the split function is as follows:

variableA=split(what, "separator", "add_prefix", "add_suffix", order)

where:

variableA identifies the variable

what identifies the unit of information, variable or parameter, to which the operation applies

separator indicates where to split the information. This value must be specified between quotes because it could contain a space.

add_prefix specifies a prefix to add to each item resulting from the split. This value must be specified between quotes because it could contain a space.

add_suffix specifies a suffix to add to each item resulting from the split. This value must be specified between quotes because it could contain a space.

order specifies the order in which the items resulting from the split are to be presented. The possible values for this parameter are left2right or right2left.

For example, in the nis.mapping file, the following variable definition is used to split an NIS domain name into a sequence of LDAP domain component attributes:

DC_NAMING=split($DOMAIN_NAME, ".", "dc=", ",", left2right)

If the domain name specified is eng.europe.xyz.com, the resulting expression is:

dc=eng, dc=europe, dc=xyz, dc=com.