I'm looking for a way to neaten up the out put of an ldapquery. I might get one, none, or several returns for each query; and each query consists of multiple lines. And while each return will contain the same types of info, it might be in a different order, like:
uniq: 1
ip: 192.168.2.3
serial: ABC123
user: smith
lab: A
uniq: 2
serial: QWERTY321
lab: 12
ip: 192.168.3.4
user: jdoe
Given the above, I'd like to wind up with:
What would be the best tool(s) to use to get moving in that direction?
uniq: 1
ip: 192.168.2.3
serial: ABC123
user: smith
lab: A
uniq: 2
serial: QWERTY321
lab: 12
ip: 192.168.3.4
user: jdoe
Given the above, I'd like to wind up with:
Code:
UNIQ SERIAL IP USER LAB
1 ABC123 192.168.2.3 jsmith A
2 QWERTY321 192.168.3.4 jdoe 12