Linux Operating System (MOSC)

MOSC Banner

NIS to LDAP migration-script (Perl)

edited Feb 28, 2013 4:00AM in Linux Operating System (MOSC) 1 commentAnswered ✓
Hi, I need assistance with a Perl script.
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.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center