LDIF Groups File to CSV

Parse and pull certain attributes and their values from the LDIF file, remove some characters and words, and add delimiters (CSV).

Skill and language preference is up to the freelancer but would prefer Perl or Python.

LDIF Example file, attribute names/values, and intended CSV will be provided (see attached)

Looking to improve on a simple and dirty bash/perl script.

Current Example (only includes two attributes)

cat $ldif | egrep -i '^dn: |^mgrpRFC822MailMember: |^$' | perl -pi -e 's/^$/~~/g' | perl -pi -e 's/,/ /g' | perl -pi -e 's/\n/,/g' | perl -pi -e 's/~~/\n/g' | perl -pi -e 's/^,|,

$//g' > $outfile-temp

cat $outfile-temp | sed -e 's/"[^"]*"//g' | sed -e 's/[<>]//g' > $outfile

Parse LDIF and pull values from only DNs which have an "objectClass" of "nsManagedMailList", ignore all others.

Attributes to CSV - columns separated by "," and attribute values in rows separated by ";"

Parse "cn" add to column A "List"

Parse "mail" add to column B "Mail"

Parse "mailEquivalentAddress", if present add to column C "mailEquivalentAddress" (if not present add no value to column)

Parse "mgmanMemberVisibility", if value is "STEALTH" or "HIDMEM" add "STEALTH" to column D "Visibility" (all other values add "FULLVIS" to column)

Parse "mgrpAllowedDomain", if present add "TRUE" to column E "Internal" (if not present add "FALSE" to column)

Parse "mgrpRFC822MailMember", for each value add to column F "Members" (semi-colon delimited for each) - remove any characters between "" and the symbols "<" and ">" and spaces (intended to only capture SMTP address, see example)

Parse "uniqueMember", for each value add to column G "Owners" (semi-colon delimited for each) - remove "uid=" and ",ou=people,o=[login to view URL],dc=com" from attribute value before adding to CSV

Skills: Perl, Shell Script, Python, Linux

See more: insert data using file csv sysutil, find certain words database, csv file bash script row, php file csv mysql, mirc autorespond certain words, function conver file csv html php, certain words hyperlinks php, vb6 source read txt file csv, oscommerce importa file csv xml, text file csv script, cgi file csv, convertire file csv outlook, mdf file csv, auto linking certain words text php, file csv virtuemart converter

About the Employer:
( 9 reviews ) Toronto, Canada

Project ID: #30089389

Awarded to:

(311 Reviews)

7 freelancers are bidding on average $169 for this job


Hi there, I'm bidding on your project "LDIF Groups File to CSV" Being an expert in Python and matlab programming I can do this project for you. please leave a message on my chat so we can discuss the budget and deadli More

$250 CAD in 4 days
(11 Reviews)

Hi, I have checked both LDIF and csv files. I can write a python software that parses LDIF file and generate csv file with necessary information. I will do it within a few hours. I have 12 years of experience in python More

$250 CAD in 7 days
(16 Reviews)

Dear client. I checked the ldif file and the csv file carefully. No problem. I can make a perfect python script to perform your job. Please ping me to discuss more. Regards.

$140 CAD in 7 days
(14 Reviews)

Hello Sir, I'm a computer science engineer and a full stack web developer with a valuable experience in the technologies required for your project (LDIF, Python, CSV manipulation ...) and I have worked on similar proje More

$190 CAD in 7 days
(7 Reviews)

Nice to meet you. "High quality in time!!!". I want to work with you long term sincerely. I can start your project immediately. I am expert in python . thank you in advance.

$200 CAD in 5 days
(3 Reviews)

Hi, I have gone through your requirement. Your target is to extract and filter some data from LDIF file and add to csv [login to view URL] are a team of freelancers having experience in full stack development. we can fullfill yo More

$100 CAD in 5 days
(1 Review)