This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ldap2json.sh | |
# | |
# Example shell script showing how to parse LDIF output from the | |
# ldapsearch command into a json array. Please note that this | |
# script almost certainly does not handle every edge case, and | |
# is best used to pull a handful of fields a user or group | |
# record in a FreeIPA ldap server and format them as JSON for use | |
# in other tools. |