Hello ALL,
I'm doing the ldapsearch with my script
Quote:
result=`ldapsearch -x -h 000.00.00.00 -p 389 -b ou=xxx,o=xxxx -D cn=xx,ou=xx,o=xx-LLL -w xxxxx '(cn=xxx)' telephonenumber loginDisabled`
echo "$result"
|
so in the output result variable is
Quote:
dn: cn=xxx,ou=xxxx,o=xxxx
telephonenumber: 123-123-1234
logindisabled: False
|
later in the script, I'm doing following..
Quote:
telenum=`grep telephonenumber $result | cut -d ":" -f2'
|
I'm not getting result from this variable, I'm getting
Quote:
grep: dn: cn=xxx,ou=xxx,o=xxxx
loginDisabled: FALSE
telephonenumber: 123-123-1234: No such file or directory
|
How do we get just phonenumber in telenum variable.
Regards