I'm using the following in my .bashrc file as a function to grep info from an external LDAP but would love for it to output a couple of values, but each on their own line
function ldaps() { ldapsearch -x -H ldaps://ldap-server.example.com -b ou=People,dc=exampe,dc=com uid=$1 | grep uidNumber: ; }
Ideally, it'd output something like:
% ldaps jsixpack
uidNumber: 9255
loginShell: /bin/bash
displayName: Joe Sixpack
Stuff like that.
Ideas, suggestions appreciated!