Вот мой код
bash-3.2$ cat nexus.ksh
#!/usr/bin/ksh
LSEARCH=$(ldapsearch -p 389 -x -D "cn=xx" -w xxxx -b "ou=access,ou=nexus,ou=applications,o=xxx,c=xx" cn=$1 | grep -i uid=$2)
echo ldap search output is "${LSEARCH}"
if [ "$LSEARCH" -eq " " ]; then
echo " User is not present in ACL group...Adding User to ACL group"
else
echo "User is present in ACL Group"
fi
вывод:
bash-3.2$ ./nexus.ksh acl.LINK_ODI_1 xxxx
ldap search output is uniquemember: uid=xxx,ou=people,ou=access,ou=nexus,ou=applications,o=xxxx,c=
./nexus.ksh[4]: uniquemember: uid=xxx,ou=people,ou=access,ou=nexus,ou=applications,o=xxx,c=: bad number
User is present in ACL Group
подскажите, где я не прав?