Is there an easier way to do the following:
echo "|||||||" | sed 's/||/|0|/g; s/||/|0|/g'
which would give the following
|0|0|0|0|0|0|
If it is not run twice it will not pick up the second occurance of the || and leave it empty as in
echo "|||||||" | sed 's/||/|0|/g'
which would give... (3 Replies)
Hello
My file looks like that =>
12.56 have then 7888778.2566 what 44454.54545
878787.66565 if else 4445.54545455
I want to change all '.' on ',' .
I'm trying to do it with sed but I don't know chow to build regular expression to
change 454.4466 on 454,4466 ? (13 Replies)
hi
is it possible to cut this two semicolon separated sed commands
echo "string2 string3 string1" | sed s'/string1//g;s/string2//g'
output: " string3 "
to just one sed command without semicolon?
thanks in advance
funksen (10 Replies)
I have a file
CREATE TABLE DDD_EXT --- 1000
(
val u1
val u1
);
CREATE TABLE dsdasd_EXT --- 1323
(
val u1
val u1
);
CREATE TABLE AAAAAA_EXT --- 1222
(
val u1
val u1
);
CREATE TABLE E_EXT --- 11
(
val u1
val u1 (2 Replies)
I have the following line an in input file I want to digest with sed and simple replace the bold part with a variable defined in my bash script. I can do this in several sed operations but I know there must be a way to do it in a single sed line. What is the syntax?
Line in file:... (1 Reply)
Cheers!
In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not?
To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
I don't understand this command behavior.
echo "abc" |sed 's/a/&_&/' (4 Replies)
Discussion started by: Vartika18
4 Replies
LEARN ABOUT DEBIAN
x500::dn
DN(3pm) User Contributed Perl Documentation DN(3pm)NAME
X500::DN - handle X.500 DNs (Distinguished Names), parse and format them
SYNOPSIS
use X500::DN;
my $dn = X500::DN->ParseRFC2253 ('cn=John Doe, o=Acme\, Inc., c=US') or die;
print $dn->getRFC2253String(), "
";
$dn = new X500::DN (new X500::RDN ('c'=>'US'), new X500::RDN ('cn'=>'John Doe'));
my $rdn0 = $dn->getRDN(0);
my $c = $rdn0->getAttributeValue ('c');
NOTE
The RFC 2253 syntax is explicitely backwards in relation to the ASN.1 SEQUENCE.
So the RFC 2253 string "cn=John Doe, c=US" has the same meaning as the X.500 string "c=US, cn=John Doe". The X500::DN objects keep the
RDNs in X.500 order!
DESCRIPTION
This module handles X.500 DNs (Distinguished Names). Currently, it parses DN strings formatted according to RFC 2253 syntax into an
internal format and produces RFC 2253 formatted string from it.
Methods
o $object = new X500::DN (rdn, rdn, ...);
Creates a DN object from zero or more arguments of type X500::RDN.
o $object = X500::DN->ParseRFC2253 ('cn=John Doe, o=Acme\, Inc., c=US');
Creates a DN object from an RFC 2253 formatted DN string notation.
o $object->getRFC2253String();
Returns the DN as a string formatted according to RFC 2253 syntax.
o $object->getOpenSSLString();
Returns the DN as a string formatted suitable for "openssl req -subj" and "openssl ca -subj".
o $object->getX500String();
Returns the DN as a string formatted according to X.500 syntax. NOTE: This is a hack, there is no definition for a X.500 string
syntax!
o $object->hasMultivaluedRDNs();
Returns whether the DN contains multi-valued RDNs.
o $object->getRDN (num);
Returns the DN's RDN at position num as an X500::RDN object. num starts with 0, which will return the first RDN in ASN.1 SEQUENCE
order.
o $object->getRDNs();
Returns the DN's RDNs, a list of objects of type X500::RDN, in ASN.1 SEQUENCE order.
EXPORT
None.
BUGS
o Due to Parse::RecDescent's greedyness, white space after attribute values gets into the parsed value. It might be possible to work
around this.
AUTHOR
Robert Joop <yaph-070708@timesink.de>
COPYRIGHT
Copyright 2002 Robert Joop. All Rights reserved. This program is free software; you can redistribute it and/or modify it under the same
terms as Perl itself.
SEE ALSO
X500::RDN, perl.
HISTORY
Early 2002: First idea, discussed on comp.lang.perl.moderated
April 2002: First public release, 0.15
perl v5.10.0 2007-07-08 DN(3pm)