I have a few lines like --
feature 1,
subfeat 0,
type 3,
subtype 1,
value 0,
--
feature 1,
subfeat 0,
type 1,
subtype 1,
value 0,
I would like to concatenate the... (1 Reply)
Hi all,
May you help me with this?
After extract only some lines that I need from a file, I would like to concatenate the remaining lines in a single line (paragraph).
Source file pattern:
Event Type: Warning
Event Source: Sorting
Event Category: None
Event ID: 1188
Date: 9/10/2008... (4 Replies)
i have a mega file in this format:
a,
b,
c,
d,
=
a2,
b2,
c2,
d2,
=
a3,
b3
=
i want to combine lines until = meet. the result should be :
a,b,c,d,
a2,b2,c3,d2
a3,b3 (13 Replies)
Does anyone know a way I can fix my file below where it has lines that are cut?
Just like the (notice the space before ms,c=PH)..
dn: cn=english,ou=Messaging,ou=lang,o=subject,t=j
ms,c=PH
which should be
dn: cn=english,ou=Messaging,ou=lang,o=subject,t=jms,c=PH
The whole text file... (5 Replies)
Hi,
I have a text file with the following contents
/C=IT/O=INFN/OU=Personal Certificate/L=Napoli/CN=Some guy
/C=IT/O=INFN/CN=INFN CA
/O=Grid/O=NorduGrid/OU=uninett.no/CN=Another guy
/O=Grid/O=NorduGrid/CN=NorduGrid Certification Authority
/C=TW/O=AP/OU=GRID/CN=Someone else... (5 Replies)
Hello,
I have been searching the forum for concatenation based on condition. I have been close enough but not got th exact one.
infile:
-----DB_Name ABC (X,
Y,Z).
DB_Name DEF (T).
DB_Name GHI (U
,V,W).
Desired Output file should be:
---------------------------DB_Name ABC... (8 Replies)
Hi,
I have a file such as:
---
>contig00001 length=35524 numreads=2944
gACGCCGCGCGCCGCGGCCAGGGCTGGCCCA
CAGGCCGCGCGGCGTCGGCTGGCTGAG
>contig00002 length=4242 numreads=43423
ATGCCGAAGGTCCGCCTGGGGCTGG
CGCCGGGAGCATGTAGCG
---
I would like to concatenate the lines not starting with ">"... (9 Replies)
Hi All,
Can any one help me in finding the solution for concatenating two or more lines in a file and writing them to a temporary file.
for Example:
He is a wise student.
So he got first rank.
This is in a file i want the output as
He is a wise student so he got first rank. into a file... (3 Replies)
How to concatenate lines with specific pattern?
I have data dumped from a table into text file. In some occurrence the data row is split into two rows.
Example:
12345678|Global Test|Global Test Task|My Request|Date|Date|Date|1|1|
12345679|Global Test2|Global Test Task2|My... (8 Replies)
Discussion started by: nixtime
8 Replies
LEARN ABOUT DEBIAN
log::agent::tag
Agent::Tag(3pm) User Contributed Perl Documentation Agent::Tag(3pm)NAME
Log::Agent::Tag - formats caller information
SYNOPSIS
Intended to be inherited from
DESCRIPTION
This class is meant to be inherited by all the classes implementing a log message tag.
A message tag is a little string that is either appended or prepended to all log messages.
For instance, and oversimplifying a bit, a tag meant to be prepended will be inserted in front of the current log message, separated by
separator, which defaults to a single space:
+------------+-----------+---------------------------------+
| tag string | separator | current log message |
+------------+-----------+---------------------------------+
This operation is called tag insertion. The whole string then becomes the current log message, and can be the target of another tag
insertion.
The reality is a little bit more complex, to allow successive tags to be prepended or appended in the order they are specified, and not in
reverse order as they would be if naively implemented. See Log::Agent::Message for the exact semantics of append() and prepend()
operations.
FEATURES
This section documents the interface provided to heirs, in case you wish to implement your own tag class.
_init(name, postfix, separator)
Initialization routine that should be called by all heirs during creation to initialize the common attributes.
postfix
When true, the tag is meant to be appended to the log message. Otherwise, it is prepended.
name
The name of this tag. It is meant to provide by-name access to tags, check whether a given tag is recorded, etc... The names "caller"
and "priority" are architecturally defined to refer to "Log::Agent::Tag::Caller" and "Log::Agent::Tag::Priority" objects.
NOTE: Currently unused by any client code.
separator
The sperating string inserted between the tag and the log message. It defaults to " " if not specified, i.e. left to "undef" when
calling _init().
string()
A deferred routine, to be implemented by heirs.
Returns the tag string only, without the separator, since its exact placement depends on the value of the "postfix" attribute.
insert(message)
Insert this tag withing the "Log::Agent::Message" message, according to the tag specifications (placement, separator). Calls string()
to produce the tag string.
This routine is frozen and should not be redefined by heirs.
STANDARD TAGGING CLASSES
Tagging classes define via their "string()" routine what is the string to be used as a tag. The insertion of the tag within the log
message is done via a frozen routine from the "Log::Agent::Tag" ancestor.
The following classes are provided by "Log::Agent":
"Log::Agent::Tag::Callback"
The "string()" routine invokes a user-supplied callback, given as a "Callback" object. You need the Callback module from CPAN if you
wish to use this class.
"Log::Agent::Tag::Caller"
Used internally to compute the caller and format it according to user specifications.
"Log::Agent::Tag::Priority"
Used internally to format message priorities and add them to the log messages.
"Log::Agent::Tag::String"
Defines a constant tagging string that should be added in all the log messages, e.g. a web session ID.
AUTHOR
Raphael Manfredi <Raphael_Manfredi@pobox.com>
SEE ALSO Log::Agent::Message(3).
perl v5.10.0 2002-03-09 Agent::Tag(3pm)