Hello People,
I want to create a script in korn shell that splits every lines of an LDAP export into columns. After, I want to import it as csv into Excel.
Let me give an example 2 lines :
user1,ou=SL7,ou=Operations,ou=TEST,o=company
user2,ou=SL3,ou=Operations,ou=TEST,ou=company,o=company
Export:
user1 ou=SL7 ou=Operations ou=TEST o=company
user2 ou=SL3 ou=Operations ou=TEST o=company
So every line has to be splitted after "," character. Every line have to be sorted by last column. (Not ever line has the same number of columns).
If may be that user3 has a supplemantary column. user3,ou=Admin Group ,ou=SL3,ou=Operations,ou=TEST,ou=company,o=company
Is this possible in shell or is perl the better language?
Thanks for every answer
Kind regards,
David