From: rfransix on 5 May 2010 16:19 After a set cmd search command, we end up with $tmp like this (two ldap attributes with their values after the equal signs): {uid=001110001,ou=People,ou=abc,ou=abcd,o=abcde,cn=Users,cn=abcdef {Name=CN=Buggs\\, Bunny D,OU=Users,OU=Corporate,DC=corp}} The two attributes are seperated with a space. The string command I'm using doesn't work, any ideas what I'm doing wrong, or a more expert method is welcome. Thank you. set rh_file(abce) [string range $tmp [expr "[string first Name $tmp]] +100"] I want rh_file(abce) to contain CN=Buggs\\, Bunny D,OU=Users,OU=Corporate,DC=corp
From: Alexandre Ferrieux on 5 May 2010 16:27 On May 5, 10:19 pm, rfransix <rfran...(a)comcast.net> wrote: > After a set cmd search command, we end up with $tmp like this (two > ldap attributes with their values after the equal signs): > > {uid=001110001,ou=People,ou=abc,ou=abcd,o=abcde,cn=Users,cn=abcdef > {Name=CN=Buggs\\, Bunny D,OU=Users,OU=Corporate,DC=corp}} > > The two attributes are seperated with a space. > > The string command I'm using doesn't work, any ideas what I'm doing > wrong, or a more expert method is welcome. Thank you. > > set rh_file(abce) [string range $tmp [expr "[string first Name $tmp]] > +100"] > > I want rh_file(abce) to contain CN=Buggs\\, Bunny > D,OU=Users,OU=Corporate,DC=corp regexp {^Name=(.*)} [lindex $tmp 1] -> rh_file(abce) -Alex
From: rfransix on 5 May 2010 16:42 On May 5, 3:27 pm, Alexandre Ferrieux <alexandre.ferri...(a)gmail.com> wrote: > On May 5, 10:19 pm, rfransix <rfran...(a)comcast.net> wrote: > > > > > > > After a set cmd search command, we end up with $tmp like this (two > > ldap attributes with their values after the equal signs): > > > {uid=001110001,ou=People,ou=abc,ou=abcd,o=abcde,cn=Users,cn=abcdef > > {Name=CN=Buggs\\, Bunny D,OU=Users,OU=Corporate,DC=corp}} > > > The two attributes are seperated with a space. > > > The string command I'm using doesn't work, any ideas what I'm doing > > wrong, or a more expert method is welcome. Thank you. > > > set rh_file(abce) [string range $tmp [expr "[string first Name $tmp]] > > +100"] > > > I want rh_file(abce) to contain CN=Buggs\\, Bunny > > D,OU=Users,OU=Corporate,DC=corp > > regexp {^Name=(.*)} [lindex $tmp 1] -> rh_file(abce) > > -Alex- Hide quoted text - > > - Show quoted text - Thanks Alex, That may work. I tried to turn around the command, cause I don't how to rep ->, when I type: set rh_file(abce) "regexp {^exName=(.*)} [lindex $tmp 1]" it returns abce:regexp#^exDistinguishedName=(.*)
From: Alexandre Ferrieux on 5 May 2010 16:45 On May 5, 10:42 pm, rfransix <rfran...(a)comcast.net> wrote: > On May 5, 3:27 pm, Alexandre Ferrieux <alexandre.ferri...(a)gmail.com> > wrote: > > > > > > > On May 5, 10:19 pm, rfransix <rfran...(a)comcast.net> wrote: > > > > After a set cmd search command, we end up with $tmp like this (two > > > ldap attributes with their values after the equal signs): > > > > {uid=001110001,ou=People,ou=abc,ou=abcd,o=abcde,cn=Users,cn=abcdef > > > {Name=CN=Buggs\\, Bunny D,OU=Users,OU=Corporate,DC=corp}} > > > > The two attributes are seperated with a space. > > > > The string command I'm using doesn't work, any ideas what I'm doing > > > wrong, or a more expert method is welcome. Thank you. > > > > set rh_file(abce) [string range $tmp [expr "[string first Name $tmp]] > > > +100"] > > > > I want rh_file(abce) to contain CN=Buggs\\, Bunny > > > D,OU=Users,OU=Corporate,DC=corp > > > regexp {^Name=(.*)} [lindex $tmp 1] -> rh_file(abce) > > > -Alex- Hide quoted text - > > > - Show quoted text - > > Thanks Alex, > > That may work. I tried to turn around the command, cause I don't how > to rep ->, when I type: > > set rh_file(abce) "regexp {^exName=(.*)} [lindex $tmp 1]" > > it returns > > abce:regexp#^exDistinguishedName=(.*) Sorry, I cannot parse your question. -Alex
From: rfransix on 5 May 2010 16:52 On May 5, 3:45 pm, Alexandre Ferrieux <alexandre.ferri...(a)gmail.com> wrote: > On May 5, 10:42 pm, rfransix <rfran...(a)comcast.net> wrote: > > > > > > > On May 5, 3:27 pm, Alexandre Ferrieux <alexandre.ferri...(a)gmail.com> > > wrote: > > > > On May 5, 10:19 pm, rfransix <rfran...(a)comcast.net> wrote: > > > > > After a set cmd search command, we end up with $tmp like this (two > > > > ldap attributes with their values after the equal signs): > > > > > {uid=001110001,ou=People,ou=abc,ou=abcd,o=abcde,cn=Users,cn=abcdef > > > > {Name=CN=Buggs\\, Bunny D,OU=Users,OU=Corporate,DC=corp}} > > > > > The two attributes are seperated with a space. > > > > > The string command I'm using doesn't work, any ideas what I'm doing > > > > wrong, or a more expert method is welcome. Thank you. > > > > > set rh_file(abce) [string range $tmp [expr "[string first Name $tmp]] > > > > +100"] > > > > > I want rh_file(abce) to contain CN=Buggs\\, Bunny > > > > D,OU=Users,OU=Corporate,DC=corp > > > > regexp {^Name=(.*)} [lindex $tmp 1] -> rh_file(abce) > > > > -Alex- Hide quoted text - > > > > - Show quoted text - > > > Thanks Alex, > > > That may work. I tried to turn around the command, cause I don't how > > to rep ->, when I type: > > > set rh_file(abce) "regexp {^exName=(.*)} [lindex $tmp 1]" > > > it returns > > > abce:regexp#^exDistinguishedName=(.*) > > Sorry, I cannot parse your question. > > -Alex- Hide quoted text - > > - Show quoted text - okay, you provided > > > regexp {^Name=(.*)} [lindex $tmp 1] -> rh_file(abce) I can't type that in and get it to work because I don't know what "->" represents. Is that a valid a tcl command? Not sure. So I tried to reverse the command and set rh_file(abce) to your regexp command, but that doesn't work either. Any ideas?
|
Next
|
Last
Pages: 1 2 3 4 5 6 Prev: Problem with Expect/netcat/telnet Next: clock microseconds with resolution in milliseconds |