Hi,
I have a file with 1200 entries and each entry is 3 lines as follows and each entry is seperated with a blank line.
dn: uid=Bart.Simpson, ou=People, o=simpson.com
Department: BSW
mailMessageStore: store9
dn: uid=Lisa.Simpson, ou=People, o=simpson.com
Department: CSW
mailMessageStore: store8
This is an output from ldapsearch on a directory server. There are 10 mailMessage Stores on the Directory server and 10 or 11 Departments. Each mailStore has users from the 10-11 different departments. I am trying to put a script together that could tell me the number of users from each Department on a mailStore.
For example, on the directory server mailStore1 has 11 users from BSW, 10 users from CSW and son on. The end result should look like this.
BSW CSW DSW ESW FSW GSW
mailStore1 24 2 100 500 98 65
mailStore2 2 3 6 5 8 6
(Depts) (Number of users in each Dept on a particular mailStore
Any help would be appreciated.
Thanks,
I have a file with 1200 entries and each entry is 3 lines as follows and each entry is seperated with a blank line.
dn: uid=Bart.Simpson, ou=People, o=simpson.com
Department: BSW
mailMessageStore: store9
dn: uid=Lisa.Simpson, ou=People, o=simpson.com
Department: CSW
mailMessageStore: store8
This is an output from ldapsearch on a directory server. There are 10 mailMessage Stores on the Directory server and 10 or 11 Departments. Each mailStore has users from the 10-11 different departments. I am trying to put a script together that could tell me the number of users from each Department on a mailStore.
For example, on the directory server mailStore1 has 11 users from BSW, 10 users from CSW and son on. The end result should look like this.
BSW CSW DSW ESW FSW GSW
mailStore1 24 2 100 500 98 65
mailStore2 2 3 6 5 8 6
(Depts) (Number of users in each Dept on a particular mailStore
Any help would be appreciated.
Thanks,