CC: | Baye Philippe <philippe.baye [...] soprasteria.com> |
Subject: | [ldifsort.pl] Don't sort if # |
Date: | Mon, 21 Dec 2015 10:13:08 +0000 |
To: | "bug-perl-ldap [...] rt.cpan.org" <bug-perl-ldap [...] rt.cpan.org> |
From: | Gandon Romuald <romuald.gandon [...] soprasteria.com> |
Hello,
I have a problem with ldifsort.pl script when LDIF files contain the sharp character "#", the dn containing "#" aren't sorted.
This problem don't print message.
Example lines:
dn: uid=ABC#DEFG#1.2.3.4.,ou=data
uid: ABC#DEFG#1.2.3.4.
My usage is:
ldifsort.pl -k dn -d file.ldif
My temporary solution is to escape "#":
sed -e 's/\([^\\]\)#/\1\\#/g'
System information:
rpm -qf /usr/share/doc/perl-LDAP-0.33/contrib/ldifsort.pl
perl-LDAP-0.33-4.el5_8
perl -v
This is perl, v5.8.8 built for x86_64-linux-thread-multi
uname -a
Linux 2.6.18-398.el5 #1 SMP Tue Sep 16 20:50:52 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/redhat-release
CentOS release 5.11 (Final)
head /usr/share/doc/perl-LDAP-0.33/contrib/ldifsort.pl
#! /usr/bin/perl
# $Id: ldifsort.pl,v 1.9 2005/04/03 20:20:24 subbarao Exp $
Thanks for this library,
Regards,
Romuald Gandon