Re: Parse x.500 DN and change order displayed
- From: Uri Guttman <uri@xxxxxxxxxxxxxxx>
- Date: Mon, 31 Mar 2008 04:09:07 GMT
"S" == SecureIT <gotsecure@xxxxxxxxx> writes:
S> I am trying to change this
S> "cn=Bob Smith+serialNumber=CR013120080827,o=ICM,c=US"
S> to this:
S> "serialNumber=CR013120080827+cn=Bob Smith,o=ICM,c=US"
S> There are about 2000 entries like this and I need to have them all
S> displayed with serialNumber first, and cn last then the rest of the
S> DN, the names and serialNumbers are all unique to each entry.
are all the entries separated by +? how many are there (you show only 2)?
if it is always + then you can just split the lines, grab out the cn one
(use grep) and also filter out the rest. then order them as you
want. call join '+' to rebuild the line. it can also be done with a hash
but that is about the same amount of code.
uri
--
Uri Guttman ------ uri@xxxxxxxxxxxxxxx -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
.
- References:
- Parse x.500 DN and change order displayed
- From: SecureIT
- Parse x.500 DN and change order displayed
- Prev by Date: Parse x.500 DN and change order displayed
- Next by Date: Re: printf: zero pad after the decimal a given amount
- Previous by thread: Parse x.500 DN and change order displayed
- Next by thread: Re: Parse x.500 DN and change order displayed
- Index(es):
Relevant Pages
|