I have a log file which contains data for last 7 seven days.
I want to copy all the data for 6 days in one file and keep only the data for today in that log file and mail that log file containing today's data.
Log file is in this format
please suggest how to separate the entries.
---------- Post updated at 03:01 PM ---------- Previous update was at 02:37 PM ----------
Getting no idea how to do this
suggest some ideas.
Moderator's Comments:
edit by bakunin: please notice, that bumping up questions is against our rules. Furthermore, you posted roughly 30 minutes ago AND ALREADY GET IMPATIENT?? This is not a helpdesk and we are not your employees! There is no obligation for anyone here to answer a certain thread - much less to answer it within some time - and if you don't change your attitude the only thing you might get is some stony silence.
Last edited by bakunin; 05-30-2012 at 06:38 AM..
Reason: Please use code tags
Hi,
With the help of below script im able to get the count of all the .xml files but that count is not specific to a day ie its the total count of all .xml files what i want is specific to 1 day and that of every half an hr ie from 23 feb 2009 7 am till 23rd feb 2009 2300 am and from 07:00 to... (1 Reply)
Hi,
I have logfile like this :
Actually the format is date format :
yyyymmddHHMMSS
and i want the log become this format
yyyy-mm-dd HH:MM:SS
for example
2009-07-19 11:46:52
Can somebody help me ?
Thanks in advance (3 Replies)
Hi, Please help on this. i want split the below file(11020111.CLT) to more files with some condition. :b:
1) %s stating of the report
2) %e ending of the report
example starting of the report:
%sAEGONCA| |MUMBAI | :EXPC|N|D
ending of the report
%eAEGONCA| |MUMBAI | :EXPC
3)so the... (10 Replies)
Hi,
I have to upload a file test_201105281100.txt to a ftp location.
The files will be created on hourly basis like test_201105281100.txt, test_201105281200.txt & so on.
After a file is uploaded successfully, I need to rename the file as test_201105281100.success & if it is not uploaded... (11 Replies)
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Can u pls advise the unix command as I have a file which contain the records in the below format
333434
435435
435443
434543
343536
Now the total line count is 89380 , now i want to create a separate
I am trying to split my large big file into small bits using the line... (2 Replies)
Hi!
Please I need help on the a script that would pick one file in a directory, change its name, them change its permissions, them move to a different directory, but has to be done on a daily basis, and the file that is being moved to its final destination has to have the following format:... (7 Replies)
Hi All,
I have more than half million lines of XML file , wanted to split in four files in a such a way that top 7 lines should be present in each file on top and bottom line of should be present in each file at bottom.
from the 8th line actual record starts and each record contains 15 lines... (14 Replies)
SA-AWL(1) User Contributed Perl Documentation SA-AWL(1)NAME
sa-awl - examine and manipulate SpamAssassin's auto-whitelist db
SYNOPSIS
sa-awl [--clean] [--min n] [dbfile]
DESCRIPTION
Check or clean a SpamAssassin auto-whitelist (AWL) database file.
The name of the file is specified after any options, as "dbfile". The default is "$HOME/.spamassassin/auto-whitelist".
OPTIONS --clean
Clean out infrequently-used AWL entries. The "--min" switch can be used to select the threshold at which entries are kept or deleted.
--min n
Select the threshold at which entries are kept or deleted when "--clean" is used. The default is 2, so entries that have only been
seen once are deleted.
OUTPUT
The output looks like this:
AVG (TOTSCORE/COUNT) -- EMAIL|ip=IPBASE
For example:
0.0 (0.0/7) -- dawson@example.com|ip=208.192
21.8 (43.7/2) -- mcdaniel_2s2000@example.com|ip=200.106
"AVG" is the average score; "TOTSCORE" is the total score of all mails seen so far; "COUNT" is the number of messages seen from that
sender; "EMAIL" is the sender's email address, and "IPBASE" is the AWL base IP address.
AWL base IP address is a way to identify the sender's IP address they frequently send from, in an approximate way, but remaining hard for
spammers to spoof. The algorithm is as follows:
- take the last Received header that contains a public IP address -- namely
one which is not in private, unrouted IP space.
- chop off the last two octets, assuming that the user may be in an ISP's
dynamic address pool.
perl v5.16.3 2014-06-10 SA-AWL(1)