User:Andy753421/bin/ldap mutt
From RHLUG
#!/bin/bash
filter="(&(|(objectClass=person)
(objectCategory=group)
(objectClass=contact))
(|(name=*$1*)
(mail=*$1*)))"
echo
ldapsearch -D LDAPSearch@rose-hulman.edu \
-w LDAPIsCool \
-z 100 \
-l 5 \
-S mail \
"$filter" \
name mail |
sed -n -e '/^name:/N;' \
-e 's/name: \([^\n]*\)\nmail: \(.*\)/\2\t\1\t/p'

