Hi,
I want to be able to list all the names in a file which begin with a capital letter, but I don't want it to list words that begin a new sentence. Is there any way round this?
Thanks for your help. (1 Reply)
Hi All,
I am new to UNIX and shell scripts and also new to this forum.
I need a script to find all the files in a directory that contain any of the strings present in another file.
Please provide me the script or if you could provide pointers to any link in this forum it would be helpful.... (4 Replies)
hello,
i 'd like your help about a bash script which:
1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel,
2.finds the link which leads to the download location of the Latest Stable Kernel version,
(the right link should lead to the file... (3 Replies)
Hello,
I have a complex problem. I have a file in which words have been joined together:
Theboy ranslowly
I want to be able to correctly split the words using a lookup file in which all the words occur:
the
boy
ran
slowly
slow
put
child
ly
The lookup file which is meant for look up... (21 Replies)
Dear all,
I am working with names and I have a large file of names in which some words are written together (upto 4 or 5) and their corresponding single forms are also present in the word-list.
An example would make this clear
annamarie
mariechristine
johnsmith
johnjoseph smith
john
smith... (8 Replies)
Hi all,
I have trouble in finding the multiple word in .txt file. Please help me with any solution.
I have 10,000 .txt files and in each file i have to search specific word but more than one, like
(data, machine learning, clustering) and all these keywords should be case insensitive because... (3 Replies)
Hi,
I have a requirement like i have to find out files and remove them on a daily basis.
The files are generated as
abc_jnfn_201404230004.csv
abc_jnfo_201404230004.csv
abc_jnfp_201404230004.csv
abc_jnfq_201404230004.csv
abd_jnfn_201404220004.csv
abe_jnfn_201404220004.csv
i want to... (1 Reply)
Hi ,
I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Hello,
I would like to change my setting in a file to the setting that user input.
For example, by default it is
ONBOOT=ON
When user key in "YES", it would be
ONBOOT=YES
--------------
This code only adds in the entire user input, but didn't replace it.
How do i go about... (5 Replies)
Hi All,
I need one help to replace particular words in file based on if finds another words in that file .
i.e.
my self is peter@king.
i am staying at north sydney.
we all are peter@king.
How to replace peter to sham if it finds @king in any line of that file.
Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
LEARN ABOUT CENTOS
net::daemon::log
Net::Daemon::Log(3) User Contributed Perl Documentation Net::Daemon::Log(3)NAME
Net::Daemon::Log - Utility functions for logging
SYNOPSIS
# Choose logging method: syslog or Win32::EventLog
$self->{'facility'} = 'mail'; # Default: Daemon
$self->{'logfile'} = undef; # Default
# Choose logging method: stderr
$self->{'logfile'} = 1;
# Choose logging method: IO handle
my $file = IO::File->new("my.log", "a");
$self->{'logfile'} = $file;
# Debugging messages (equivalent):
$self->Log('debug', "This is a debugging message");
$self->Debug("This is a debugging message");
# Error messages (equivalent):
$self->Log('err', "This is an error message");
$self->Error("This is an error message");
# Fatal error messages (implies 'die')
$self->Fatal("This is a fatal error message");
WARNING
THIS IS ALPHA SOFTWARE. It is *only* 'Alpha' because the interface (API) is not finalised. The Alpha status does not reflect code quality
or stability.
DESCRIPTION
Net::Daemon::Log is a utility class for portable logging messages. By default it uses syslog (Unix) or Win32::EventLog (Windows), but
logging messages can also be redirected to stderr or a log file.
Generic Logging
$self->Log($level, $msg, @args);
This is the generic interface. The logging level is in syslog style, thus one of the words 'debug', 'info', 'notice', 'err' or 'crit'.
You'll rarely need info and notice and I can hardly imagine a reason for crit (critical). In 95% of all cases debug and err will be
sufficient.
The logging string $msg is a format string similar to printf.
Utility methods
$self->Debug($msg, @args);
$self->Error($msg, @args);
$self->Fatal($msg, @args);
These are replacements for logging with levels debug and err. The difference between the latter two is that Fatal includes throwing a Perl
exception.
Chossing a logging target
By default logging will happen to syslog (Unix) or EventLog (Windows). However you may choose logging to stderr by setting
$self->{'logfile'} = 1;
This is required if neither of syslog and EventLog is available. An alternative option is setting
$self->{'logfile'} = $handle;
where $handle is any object supporting a print method, for example an IO::Handle object. Usually the logging target is choosen as soon as
you call $self->Log() the first time. However, you may force choosing the target by doing a
$self->OpenLog();
before calling Log the first time.
MULTITHREADING
The Multithreading capabitities of this class are depending heavily on the underlying classes Sys::Syslog, Win32::EventLog or IO::Handle.
If they are thread safe, you can well assume that this package is too. (The exception being that you should better call $self->OpenLog()
before threading.)
AUTHOR AND COPYRIGHT
Net::Daemon is Copyright (C) 1998, Jochen Wiedmann
Am Eisteich 9
72555 Metzingen
Germany
Phone: +49 7123 14887
Email: joe@ispsoft.de
All rights reserved.
You may distribute this package under the terms of either the GNU
General Public License or the Artistic License, as specified in the
Perl README file.
SEE ALSO Net::Daemon(3), Sys::Syslog(3), Win32::EventLog(3), IO::Handle(3)perl v5.16.3 2011-03-01 Net::Daemon::Log(3)