Hi experts,
First of all thanks for all your help.
How can i count the lines within a text file and send this number to another text file?
And by the way how can i count the number of files inside a tape ("/dev/rtp") that as one pattern (Ex. "/CTA/") and send this number to a text file?
I... (6 Replies)
Hello,
I have afile which begins with a few urls on multiple lines and then there is listing of some information on separate lines.
The listing begins with the word Name on a given line followed by teh actual list.
I want to count the number of lines in this file after the line having... (6 Replies)
I have a file called xx with the env redirected into it 5 times:
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
I have to read an input file (here: xx) and look for occurrences of the current user who is executing this script. Once finding an occurrence of the username I have to take that... (4 Replies)
I have a file called xx with the env redirected into it 5 times:
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
I have to read an input file (here: xx) and look for occurrences of the current user who is executing this script. Once finding an occurrence of the username I have to take that... (2 Replies)
Hi,
I have a little problem with counting lines. I know similar topics from this forum, but they don't resolve my problem. I have file with lines like this:
2009-05-25 16:55:32,143 some text some regular expressions ect.
2009-05-25 16:55:32,144 some text.
2009-05-28 18:15:12,148 some... (4 Replies)
I'm trying to write a script to clean up log file automatically when it reaches 1000 lines. I can't get this to work..can some help me please :)
Server: SunOS 5.8 Generic_117350-53 sun4u sparc SUNW,Netra-T12
#!/bin/ksh
#file reference
file=`echo "$HOME/support/moe/b.tc"`
#linecount... (7 Replies)
Hi,
I'm using the command: sed -n '$=' $1 on a sh script on AIX.
This script is used to count the number of lines of files.
If the file has no lines at all the command doesn't return nothing.
I need the command to return 0 when the file has no lines at all.
How can I achieve this?
Best... (5 Replies)
Counting number of lines: sp
I am trying to figure out a script to count the number of text files in cywig and have it give me a number (as the answer) any help would be appreciated.
I am new here, so be gentle :D (3 Replies)
tail -f /var/log/syslog | egrep -c FATAL
is there a way to do the above and actually have the number of lines matching the pattern increment as it is logged to the log file?
for instance, when you invoke a command like the one i just posted, you'll not get the total lines unless you do... (4 Replies)
Discussion started by: SkySmart
4 Replies
LEARN ABOUT DEBIAN
app::info::handler::carp
App::Info::Handler::Carp(3pm) User Contributed Perl Documentation App::Info::Handler::Carp(3pm)NAME
App::Info::Handler::Carp - Use Carp to handle App::Info events
SYNOPSIS
use App::Info::Category::FooApp;
use App::Info::Handler::Carp;
my $carp = App::Info::Handler::Carp->new('carp');
my $app = App::Info::Category::FooApp->new( on_info => $carp );
# Or...
my $app = App::Info::Category::FooApp->new( on_error => 'croak' );
DESCRIPTION
App::Info::Handler::Carp objects handle App::Info events by passing their messages to Carp functions. This means that if you want errors to
croak or info messages to carp, you can easily do that. You'll find, however, that App::Info::Handler::Carp is most effective for info and
error events; unknown and prompt events are better handled by event handlers that know how to prompt users for data. See
App::Info::Handler::Prompt for an example of that functionality.
Upon loading, App::Info::Handler::Carp registers itself with App::Info::Handler, setting up a number of strings that can be passed to an
App::Info concrete subclass constructor. These strings are shortcuts that tell App::Info how to create the proper App::Info::Handler::Carp
object for handling events. The registered strings are:
carp
Passes the event message to "Carp::carp()".
warn
An alias for "carp".
croak
Passes the event message to "Carp::croak()".
die An alias for "croak".
cluck
Passes the event message to "Carp::cluck()".
confess
Passes the event message to "Carp::confess()".
INTERFACE
Constructor
new
my $carp_handler = App::Info::Handler::Carp->new;
$carp_handler = App::Info::Handler::Carp->new( level => 'carp' );
my $croak_handler = App::Info::Handler::Carp->new( level => 'croak' );
Constructs a new App::Info::Handler::Carp object and returns it. It can take a single parameterized argument, "level", which can be any one
of the following values:
carp
Constructs a App::Info::Handler::Carp object that passes the event message to "Carp::carp()".
warn
An alias for "carp".
croak
Constructs a App::Info::Handler::Carp object that passes the event message to "Carp::croak()".
die An alias for "croak".
cluck
Constructs a App::Info::Handler::Carp object that passes the event message to "Carp::cluck()".
confess
Constructs a App::Info::Handler::Carp object that passes the event message to "Carp::confess()".
If the "level" parameter is not passed, "new()" will default to creating an App::Info::Handler::Carp object that passes App::Info event
messages to "Carp::carp()".
BUGS
Please send bug reports to <bug-app-info@rt.cpan.org> or file them at <http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-Info>.
AUTHOR
David Wheeler <david@justatheory.com>
SEE ALSO
App::Info documents the event handling interface.
Carp of documents the functions used by this class.
App::Info::Handler::Print handles events by printing their messages to a file handle.
App::Info::Handler::Prompt offers event handling more appropriate for unknown and confirm events.
App::Info::Handler describes how to implement custom App::Info event handlers.
COPYRIGHT AND LICENSE
Copyright (c) 2002-2008, David Wheeler. Some Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2011-03-15 App::Info::Handler::Carp(3pm)