Forum Discussion

Mark_Porter_979's avatar
Mark_Porter_979
Icon for Nimbostratus rankNimbostratus
May 27, 2006

LDAP whitespace filtering

Is there a way to remove whitespaces from the memberOf responses from an LDAP query?

 

 

I need the response that looks like this:

 

 

 

memberOf: cn=pm_Production, cn=Products, ou=Groups, o=Liberty, o=Intranet

 

 

 

to look like this:

 

 

 

memberOf: cn=pm_Production,cn=Products,ou=Groups,o=Liberty,o=Intranet

 

 

 

 

  • regsub -all " " $oldstring "" newstring

     

     

    will work for your. it will delete all the space in the oldstring then set it to newstring