Hello People,
I have the following contents in an XML file
...........
...........
..........
...........
<Details = "Sample Details">
<Name>Bob</Name>
<Age>34</Age>
<Address>CA</Address>
<ContactNumber>1234</ContactNumber>
</Details>
...........
.............
.............. (4 Replies)
Hi experts a have a very large file and I need to add two columns: the first one numbering the incidence of records and the another with the total count
The input file:
21 2341 A
21 2341 A
21 2341 A
21 2341 C
21 2341 C
21 2341 C
21 2341 C
21 4567 A
21 4567 A
21 4567 C
... (6 Replies)
Hallo,
im basically a complete noob on shell scripting and im trying to replace or rather add 1 to a number between xml tags.
The xml basically has a tag somewhere that looks like this:
<tag>12345678901234</tag>
Now i want to replace the number between the tags. And i want the file to... (6 Replies)
I want to put one xml record in one row and so on...
sample two records are here.
<?xml version="1.0"?>
<Object>
<Header>
<XCOMVers>V1.0</XCOMVers>
<REPORT>XXXXX</REPORT>
<CODE>002</CODE>
</Header>
<IssueCard>
<Record>
<L>CAR SYSTEM -SSSSS -</L>
... (1 Reply)
I want to put one xml record in one row and so on...
sample two records are here.
<?xml version="1.0"?>
<Object>
<Header>
<XCOMVers>V1.0</XCOMVers>
<REPORT>XXXXX</REPORT>
<CODE>002</CODE>
</Header>
<IssueCard>
<Record>
<L>CAR SYSTEM -SSSSS -</L>
... (3 Replies)
Hi Power User,
I'm trying to compute this kind of text file format:
file1:
jakarta 100 150
jakarta 170 210
beijing 220 250
beijing 260 280
beijing 290 320
new_york 330 350
new_york 370 420
tokyo 430 470
tokyo 480 ... (2 Replies)
I've got two different files and want to compare them.
File 1 :
HTML Code:
<response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record... (1 Reply)
I have a fixed length file and I want to find out row number along with row length.
I have a program that give me the line length if it satisfy the condition; but i would like to add row number as well?
How do I do that?
while IFS= read -r line; do
if ; then
echo ${line}
echo... (8 Replies)
Hi.
How can we print those rows of file2 which are mentioned in file1. first character of file1 is a row number.. for eg
file1
1:abc
3:ghi
6:pqr
file2
a abc
b def
c ghi
d jkl
e mno
f pqr
... (6 Replies)
Hi. How can I read row number from one file and print that corresponding record present at that row in another file.
eg
file1
1
3
5
7
9
file2
11111
22222
33333
44444
55555
66666
77777
88888
99999 (3 Replies)
Discussion started by: Abhiraj Singh
3 Replies
LEARN ABOUT DEBIAN
log::report::exception
Log::Report::Exception(3pm) User Contributed Perl Documentation Log::Report::Exception(3pm)NAME
Log::Report::Exception - a collected report
SYNOPSIS
# created within a try block
try { error "help!" };
my $exception = $@->wasFatal;
$exception->throw if $exception;
$@->reportFatal; # combination of above two lines
my $message = $exception->message; # the Log::Report::Message
if($message->inClass('die')) ...
if($exception->inClass('die')) ... # same
if($@->wasFatal(class => 'die')) ... # same
DESCRIPTION
In Log::Report, exceptions are not as extended as available in languages as Java: you do not create classes for them. The only thing an
exception object does, is capture some information about an (untranslated) report.
METHODS
Constructors
Log::Report::Exception->new(OPTIONS)
-Option --Default
message <required>
reason <required>
report_opts {}
message => Log::Report::Message
reason => REASON
report_opts => HASH
Accessors
$obj->isFatal
Returns whether this exception has a severity which makes it fatal when thrown. See Log::Report::isFatal().
example:
if($ex->isFatal) { $ex->throw(reason => 'ALERT') }
else { $ex->throw }
$obj->message([MESSAGE])
Change the MESSAGE of the exception, must be a Log::Report::Message object.
When you use a "Log::Report::Message" object, you will get a new one returned. Therefore, if you want to modify the message in an
exception, you have to re-assign the result of the modification.
example:
$e->message->concat('!!')); # will not work!
$e->message($e->message->concat('!!'));
$e->message(__x"some message {msg}", msg => $xyz);
$obj->reason([REASON])
$obj->report_opts
Processing
$obj->inClass(CLASS|REGEX)
Check whether any of the classes listed in the message match CLASS (string) or the REGEX. This uses Log::Report::Message::inClass().
$obj->print([FILEHANDLE])
The default filehandle is STDOUT.
example:
print $exception; # via overloading
$exception->print; # OO style
$obj->throw(OPTIONS)
Insert the message contained in the exception into the currently defined dispatchers. The "throw" name is commonly known exception
related terminology for "report".
The OPTIONS overrule the captured options to Log::Report::report(). This can be used to overrule a destination. Also, the reason can
be changed.
example: overrule defaults to report
try { print {to => 'stderr'}, ERROR => 'oops!' };
$@->reportFatal(to => 'syslog');
$exception->throw(to => 'syslog');
$@->wasFatal->throw(reason => 'WARNING');
$obj->toString
Prints the reason and the message. Differently from throw(), this only represents the textual content: it does not re-cast the
exceptions to higher levels.
example: printing exceptions
print $_->toString for $@->exceptions;
print $_ for $@->exceptions; # via overloading
OVERLOADING
overload: stringification
Produces "reason: message".
SEE ALSO
This module is part of Log-Report distribution version 0.94, built on August 23, 2011. Website: http://perl.overmeer.net/log-report/
LICENSE
Copyrights 2007-2011 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.14.2 2011-08-23 Log::Report::Exception(3pm)