Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to find particular file-name in file and get result in table in mail? Post 303042999 by yash_message on Wednesday 15th of January 2020 01:31:57 PM
Old 01-15-2020
How to find particular file-name in file and get result in table in mail?

We have 100 linux servers, All send logs to both centralize server(server1 and serverb).
all send logs every day and stores in /syslog folder with hostname.log file.
I need to prepare script to check every day from both centralize server(server1 and serverb) and send mail in table format.

Code:
Date- 
Hostname     server1                                                                serverb
Abc1.log          Log received                                                     Log received
abc2.log         log not received                                               Log received


Please help me the logic , how to prepare script to get the result in table format.

Last edited by RavinderSingh13; 01-15-2020 at 09:40 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to find a file and send a mail

I need a shell script which checks for a file in a particuler folder and should send me a mail if the file of that name is present. Please help me on this.I am new to shell scripting. (6 Replies)
Discussion started by: jayaramanit
6 Replies

2. UNIX for Advanced & Expert Users

Find accessed file in past 1 or 2 minutes, and throw mail.

Can Anyone tell me how to write the Script to "find file(s) in a directory that is being accessed in last 5 minutes, and if there is result of that find, then throw the mail ". Means throw the mail to a person regarding whoever and whenever a file is accessed in a directory. ASAP. Thnks. (2 Replies)
Discussion started by: varungupta
2 Replies

3. Shell Programming and Scripting

Outputting formatted Result log file from old 30000 lines result log<help required>

Well I have a 3000 lines result log file that contains all the machine data when it does the testing... It has 3 different section that i am intrsted in 1) starting with "20071126 11:11:11 Machine Header 1" 1000 lines... "End machine header 1" 2) starting with "20071126 12:12:12 Machine... (5 Replies)
Discussion started by: vikas.iet
5 Replies

4. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

5. Shell Programming and Scripting

Find diff bet 2 files and store result in another file

Hi I want to compare 2 files. The files have the same amount of rows and columns. So each line must be compare against the other and if one differs from the other, the result of both must be stored in a seperate file. I am doing this in awk. Here is my file1: Blocks... (2 Replies)
Discussion started by: ladyAnne
2 Replies

6. Shell Programming and Scripting

Match look up file and find result

Hi I ahve a lookup file wiht seven words CD HT CAD HT T1D T2D BDanother file contain data like this CHRM1 P11229 Pirenzepine DAP000492 Peptic ulcer disease Approved T2D CHRM1 P11229 Glycopyrrolate DAP001116 Anesthetic Approved T2D CHRM1 P11229 ... (7 Replies)
Discussion started by: manigrover
7 Replies

7. Shell Programming and Scripting

Hit multiple URL from a text file and store result in other test file

Hi, I have a problem where i have to hit multiple URL that are stored in a text file (input.txt) and save their output in different text file (output.txt) somewhat like : cat input.txt http://192.168.21.20:8080/PPUPS/international?NUmber=917875446856... (3 Replies)
Discussion started by: mukulverma2408
3 Replies

8. Shell Programming and Scripting

HELP simple script to find e-mail address on a file

Hello guys, im new to to unix/linux i have a text file like this: person1@test.com iisiiasasas person2@test.com 123w2 3233 sajsja person3@test.com jsajjsa sajsjasaj person4@test.com I want to extract only e-mail address and get rid of all other stuff, i want an output like this ... (4 Replies)
Discussion started by: RazorMX
4 Replies

9. Shell Programming and Scripting

How to compare 2 files and create a result file with unmatched lines from first file.?

HI, I have 2 text files. file1 and file2. file1.txt (There are no duplicates in this file) 1234 3232 4343 3435 6564 6767 1213 file2.txt 1234,wq,wewe,qwqw 1234,as,dfdf,dfdf 4343,asas,sdds,dsds 6767,asas,fdfd,fdffd I need to search each number in file1.txt in file2.txt's 1st... (6 Replies)
Discussion started by: Little
6 Replies

10. UNIX for Beginners Questions & Answers

Improving find to read table name from file

Hi there, I currently use the following find command to recursively search all the subdirectories in our file system for a table ( in this case BB_TENURE_DAYS) find -type f -exec grep -l "BB_TENURE_DAYS" {} \+ So I have this so far - the problem is how do I read the line to get the... (2 Replies)
Discussion started by: rjsha1
2 Replies
Log::Any::Adapter(3pm)					User Contributed Perl Documentation				    Log::Any::Adapter(3pm)

NAME
Log::Any::Adapter -- Tell Log::Any where to send its logs VERSION
version 0.07 SYNOPSIS
use Log::Any::Adapter; # Use Log::Log4perl for all categories # Log::Log4perl::init('/etc/log4perl.conf'); Log::Any::Adapter->set('Log4perl'); # Use Log::Dispatch for Foo::Baz # use Log::Dispatch; my $log = Log::Dispatch->new(outputs => [[ ... ]]); Log::Any::Adapter->set( { category => 'Foo::Baz' }, 'Dispatch', dispatcher => $log ); # Use Log::Dispatch::Config for Foo::Baz and its subcategories # use Log::Dispatch::Config; Log::Dispatch::Config->configure('/path/to/log.conf'); Log::Any::Adapter->set( { category => qr/^Foo::Baz/ }, 'Dispatch', dispatcher => Log::Dispatch::Config->instance() ); # Use your own adapter for all categories # Log::Any::Adapter->set('+My::Log::Any::Adapter', ...); DESCRIPTION
The "Log-Any-Adapter" distribution implements Log::Any class methods to specify where logs should be sent. It is a separate distribution so as to keep "Log::Any" itself as simple and unchanging as possible. You do not have to use anything in this distribution explicitly. It will be auto-loaded when you call one of the methods below. ADAPTERS
In order to use a logging mechanism with "Log::Any", there needs to be an adapter class for it. Typically this is named Log::Any::Adapter::something. The following adapters are available on CPAN as of this writing: o Log::Any::Adapter::Log4perl - work with log4perl o Log::Any::Adapter::Dispatch - work with Log::Dispatch or Log::Dispatch::Config You may also find other adapters on CPAN by searching for "Log::Any::Adapter", or create your own adapter. See Log::Any::Adapter::Development for more information on the latter. SETTING AND REMOVING ADAPTERS
Log::Any::Adapter->set ([options, ]adapter_name, adapter_params...) This method sets the adapter to use for all log categories, or for a particular set of categories. adapter_name is the name of an adapter. It is automatically prepended with "Log::Any::Adapter::". If instead you want to pass the full name of an adapter, prefix it with a "+". e.g. # Use My::Adapter class Log::Any::Adapter->set('+My::Adapter', arg => $value); adapter_params are passed along to the adapter constructor. See the documentation for the individual adapter classes for more information. An optional hash of options may be passed as the first argument. Options are: category A string containing a category name, or a regex (created with qr//) matching multiple categories. If not specified, all categories will be affected. lexically A reference to a lexical variable. When the variable goes out of scope, the adapter setting will be removed. e.g. { Log::Any::Adapter->set({lexically => my $lex}, ...); # in effect here ... } # no longer in effect here "set" returns an entry object, which can be passed to "remove". Log::Any::Adapter->remove (entry) Remove an entry previously returned by "set". MULTIPLE ADAPTER SETTINGS
"Log::Any" maintains a stack of entries created via "set". When you get a logger for a particular category, "Log::Any" will work its way down the stack and use the first matching entry. Whenever the stack changes, any "Log::Any" loggers that have previously been created will automatically adjust to the new stack. For example: my $log = Log::Any->get_logger(); $log->error("aiggh!"); # this goes nowhere ... { Log::Any::Adapter->set({ local => my $lex }, 'Log4perl'); $log->error("aiggh!"); # this goes to log4perl ... } $log->error("aiggh!"); # this goes nowhere again SEE ALSO
Log::Any COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Jonathan Swartz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-02-22 Log::Any::Adapter(3pm)
All times are GMT -4. The time now is 12:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy