NIS to LDAP migration-script (Perl)
The script should be used to the / etc / hosts file to convert to the ldif format.
It read a file line by line and read while the content of each column and list.
The problem here, the separation of the columns in the row.
Both Tab and hash (#) at separator are used.
the content of my file;
173.194.44.23 hostname alias # Comment with text, numbers, and some with a comma
ultimately, the issue needs to look like this
ipadresse: 173.194.44.23
Hostname: hostname
alias: alias
description: Comment with text, numbers, and some with a comma
This is the script but it does not work.