okay, so far i've got this command
[root@fedora bash]# ldapsearch -LLL -x -D "cn=moodleuser,dc=example,dc=com" -h senior-server.example.com -b "dc=example,dc=com" -w Password mail=*@* -S mail=*@* sAMAccountName mail > /home/ldap/output.txt
and it's giving me this output
dn: cn=moodleuser,dc=example,dc=com
mail:
moodle.user@example.com
sAMAccountName: moodleuser
what i REALLY want is just
moodleuser: moodle.user
what i really want is to be able to edit the output of the 'ldapsearch' command, but if thats not possable i was thinking that maybe a second script would be good. one that edits out the unnecessary information? so i'm looking for maybe a command that counts characters and lines or something like that and a command that can delete characters.