SweetyXOXO
Programmer
Hi!
I'm an AWK Beginner and I have no idea how to deal with my problem.
when i do a Ldap request for user "ur002" i get an output like this (example):
username='ur002'
TAG='0',
VENDOR='2352',
ATTRIBUTE='4',
VALUE_STR='local'},
The numbers behind the Parameters Vendor an Attribute are the values, which you can find in 2 tables AAADICTIONARYVENDOR and AAADICTIONARYATTR
The programm i need to build with awk should first search "2352" in AAADICTIONARYVENDOR. The Table looks like this:
0|MARKONE|6728
1|IKINCI|5
2|UEC|9
3|FEREI|61
4|OCOCU|166
5|ALPER|2352
it has to copy the Value "ALPER" and paste it into the first output next to VENDOR
in the second step we have to deal with the table AAADICTIONARYATTR. This one is a little bit more difficult. it looks like this (also an excerpt)
845|MARKONE-ALLOW-ALL-VR-ACCESS|19|1|6728
846|MARKONE-ALT-CLI-ACCESS-LEVEL|20|2|6728
847|MARKONE-ALT-CLI-VROUTER-NAME|21|2|6728
848|MARKONE-SA-VALIDATE|22|1|6728
849|MARKONE-IGMP-ENABLE|23|1|6728
850|UEC-USER-PRIV|1|1|9
851|UEC-SERVICE-PROFILE|2|2|9
852|UEC-VPN-NAME|3|2|9
853|UEC-ISOS-VERSION|4|1|9
854|UEC-L2TP-TUNSET|5|1|9
855|ALPER-CLIENT-DNS-PRI|1|2|2352
856|ALPER-CLIENT-DNS-SEC|2|2|2352
857|ALPER-DHCP-MAX-LEASES|3|1|2352
858|ALPER-CONTEXT-NAME|4|2|2352
859|ALPER-BRIDGE-GROUP|5|2|2352
860|ALPER-BG-AGING-TIME|6|2|2352
In the first Output we had the attribute value 4, and the vendor 2352. So we have to find in this table the value 4|X|2352 and copy the full name (858|ALPER-CONTEXT-NAME|4|2|2352) also in first output.
So if i do a request for user 'ur002' i need to get this output:
username='ur002'
TAG='0',
VENDOR='2352', ALPER
ATTRIBUTE='4', 858|ALPER-CONTEXT-NAME|4|2|2352
VALUE_STR='local'},
I will be grateful for any help!
Blessed Christmas Time!
I'm an AWK Beginner and I have no idea how to deal with my problem.
when i do a Ldap request for user "ur002" i get an output like this (example):
username='ur002'
TAG='0',
VENDOR='2352',
ATTRIBUTE='4',
VALUE_STR='local'},
The numbers behind the Parameters Vendor an Attribute are the values, which you can find in 2 tables AAADICTIONARYVENDOR and AAADICTIONARYATTR
The programm i need to build with awk should first search "2352" in AAADICTIONARYVENDOR. The Table looks like this:
0|MARKONE|6728
1|IKINCI|5
2|UEC|9
3|FEREI|61
4|OCOCU|166
5|ALPER|2352
it has to copy the Value "ALPER" and paste it into the first output next to VENDOR
in the second step we have to deal with the table AAADICTIONARYATTR. This one is a little bit more difficult. it looks like this (also an excerpt)
845|MARKONE-ALLOW-ALL-VR-ACCESS|19|1|6728
846|MARKONE-ALT-CLI-ACCESS-LEVEL|20|2|6728
847|MARKONE-ALT-CLI-VROUTER-NAME|21|2|6728
848|MARKONE-SA-VALIDATE|22|1|6728
849|MARKONE-IGMP-ENABLE|23|1|6728
850|UEC-USER-PRIV|1|1|9
851|UEC-SERVICE-PROFILE|2|2|9
852|UEC-VPN-NAME|3|2|9
853|UEC-ISOS-VERSION|4|1|9
854|UEC-L2TP-TUNSET|5|1|9
855|ALPER-CLIENT-DNS-PRI|1|2|2352
856|ALPER-CLIENT-DNS-SEC|2|2|2352
857|ALPER-DHCP-MAX-LEASES|3|1|2352
858|ALPER-CONTEXT-NAME|4|2|2352
859|ALPER-BRIDGE-GROUP|5|2|2352
860|ALPER-BG-AGING-TIME|6|2|2352
In the first Output we had the attribute value 4, and the vendor 2352. So we have to find in this table the value 4|X|2352 and copy the full name (858|ALPER-CONTEXT-NAME|4|2|2352) also in first output.
So if i do a request for user 'ur002' i need to get this output:
username='ur002'
TAG='0',
VENDOR='2352', ALPER
ATTRIBUTE='4', 858|ALPER-CONTEXT-NAME|4|2|2352
VALUE_STR='local'},
I will be grateful for any help!
Blessed Christmas Time!