</source>
We need to create an array of the distinguished namesthe complete result:
<source lang='bash'>
childrenredult=$(ldapsearch -LLL -x -s children \
-H "$ldap_server" \
-b "$ldap_base" \
</source>
Finally, we need ti to loop over all the distinguished names and replace the original (old) content to the attribute with the new content:
<source lang='bash'>
for dn in $children