Hi All,
I'm deffently not a Unix specialist so be Gentel.
I need to parse a Log file that looks like that:
2006-06-12 01:00:00,463 ERROR {cleanLoggersFiles} General Error
comverse.compas.shared.exceptions.SystemParametersException: Error in reading parameter FileLocation
at... (4 Replies)
I have a large log file, which I want to first use grep to get the specific lines then send it to awk to print out the specific column and if the result is zero, don't do anything. What I have so far is:
LOGDIR=/usr/local/oracle/Transcription/log
ERRDIR=/home/edixftp/errors
#I want to be... (3 Replies)
Hi Experts,
Im a new bee for scripting,
I would ned to do the following via linux shell scripting, I have an application which throws a log file, on each action of a particular work with the application, as sson as the action is done, the log file would vanish or stops updating there, the... (2 Replies)
I'm new to scripting and was wondering if there was a way to accomplish what I want below using shell script(s).
If there is a log file as follows, where the id is the unique id of a process, with the timestamp of when the process began and completed displayed, would it be possible to find the... (3 Replies)
Hi
i have a log file, which keeps appending, i want to find "exceptions" in that log file and copy those exceptions to another file.
i am using
grep exception filename >> location where to copy
but as the file is appending, am not able to view.
i am using
tail -f command ,
... (5 Replies)
Working on a script that inputs an IP, parses and outputs to another file.
A Sample of the log is as follows:
I need the script to be able to input IP and print the data in an output file in the following format or something similar:
Thanks for any help you can give me! (8 Replies)
Hello all,
I am new to scripting and I have written a script that performs an Rsync on my NAS and then moves on to send me an email with the status etc. The problem is that I think Rsync is taking to long to complete and the IF statement is timing out, as it doesn't appear to move on.
Here... (1 Reply)
Hi,
I am a newbie to scripting.
I have multiple log files (saved as .gz) in a directory that looks like this
01-01-2013 10:00 pn: 123
01-01-2013 10:00 sn: 987
01-01-2013 10:00 Test1
01-01-2013 10:00 Result: Pass
01-01-2013 10:00 Time: 5:00
01-01-2013 10:00 Test2
01-01-2013 10:00... (3 Replies)
I want to parse a log file which i am grepping root user connection but is showing whole day and previous day detail as well.
First i want to see last 2 hours log file then after that i want to search particular string. Lets suppose right now its 5:00PM, So i want to see the log of 3:00PM to... (6 Replies)
Hi,
I have a log file that looks like below and I am wanting to know if there is a better way of parsing it from how I am doing it right now.
I am looking for when an application service is OFFLINE and ONLINE. This log file is getting written into every 30 minutes
... (1 Reply)
Discussion started by: newbie_01
1 Replies
LEARN ABOUT DEBIAN
datetime::format::builder::parser::generic
DateTime::Format::Builder::Parser::generic(3pm) User Contributed Perl Documentation DateTime::Format::Builder::Parser::generic(3pm)NAME
DateTime::Format::Builder::Parser::generic - Useful routines
METHODS
Useful
new
Standard constructor. Returns a blessed hash; any arguments are placed in the hash. This is useful for storing information between methods.
generic_parser
This is a method provided solely for the benefit of "Parser" implementations. It semi-neatly abstracts a lot of the work involved.
Basically, it takes parameters matching the assorted callbacks from the parser declarations and makes a coderef out of it all.
Currently recognized callbacks are:
o on_match
o on_fail
o preprocess
o postprocess
Methods for subclassing
These are methods you should define when writing your own subclass.
Note: these methods do not exist in this class. There is no point trying to call "$self->SUPER::do_match( ... )".
do_match
"do_match" is the first phase. Arguments are the date and @args. "self", "label", "args". Return value must be defined if you match
successfully.
post_match
"post_match" is called after the appropriate callback out of "on_match"/"on_fail" is done. It's passed the date, the return value from
"do_match" and the parsing hash.
Its return value is used as the "post" argument to the "postprocess" callback, and as the second argument to "make".
make
"make" takes the original input, the return value from "post_match" and the parsing hash and should return a "DateTime" object or
undefined.
Delegations
For use of "Parser", this module also delegates "valid_params" and "params". This is just convenience to save typing the following:
DateTime::Format::Builder::Parser->valid_params( blah )
Instead we get to type:
$self->valid_params( blah );
__PACKAGE__->valid_params( blah );
WRITING A SUBCLASS
Rather than attempt to explain how it all works, I think it's best if you take a look at Regex.pm and Strptime.pm as examples and work from
there.
THANKS
See DateTime::Format::Builder.
SUPPORT
Support for this module is provided via the datetime@perl.org email list. See http://lists.perl.org/ for more details.
Alternatively, log them via the CPAN RT system via the web or email:
http://perl.dellah.org/rt/dtbuilder
bug-datetime-format-builder@rt.cpan.org
This makes it much easier for me to track things and thus means your problem is less likely to be neglected.
LICENCE AND COPYRIGHT
Copyright X Iain Truskett, 2003. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.000 or,
at your option, any later version of Perl 5 you may have available.
The full text of the licences can be found in the Artistic and COPYING files included with this module, or in perlartistic and perlgpl as
supplied with Perl 5.8.1 and later.
AUTHOR
Iain Truskett <spoon@cpan.org>
SEE ALSO
"datetime@perl.org" mailing list.
http://datetime.perl.org/
perl, DateTime, DateTime::Format::Builder, DateTime::Format::Builder::Parser.
perl v5.10.1 2010-03-14 DateTime::Format::Builder::Parser::generic(3pm)