Sponsored Content
Top Forums Shell Programming and Scripting Script for checking yesterday's log Post 302420575 by Franklin52 on Wednesday 12th of May 2010 03:52:52 AM
Old 05-12-2010
There are a bunch of threads regarding this stuff, search for yesterday with the Google Custom Search function right above the page.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

log file checking

Hi, I want to write a script which will count the occurence of several different strings in a log file? Can anyone help me with this? Thanks in advance! (1 Reply)
Discussion started by: mpang_
1 Replies

2. Shell Programming and Scripting

Yesterday date script

Hello All, I am using the below script to get yesterday date, but it is giving date of day before yesterday. Right now its 080906 but this code is giving 080904. And my requirement is 080905. #!/bin/sh CurrentDate=`TZ="GMT+24" date +'%y%m%d'` echo $CurrentDate; WHY? Please help.. ... (7 Replies)
Discussion started by: wakhan
7 Replies

3. Shell Programming and Scripting

Problem to get yesterday's date flatfile with shell script

hi, i was required to write a shell script to get yesterday's date flatfile. but i only know how to get today's date flatfile. Please observed my below scripting: Please help! Thanks ================================================= #!/bin/sh HOST='192.168.1.200' USER='ftp1'... (19 Replies)
Discussion started by: lifeseries
19 Replies

4. Shell Programming and Scripting

Script to Grep column 3 from csv file generated yesterday

Hello, Can any one please assist how to scirpt it: Every day a new log file is create and I want to process only the one generated yesterday and get the data of column 3 and 6. For example today's date is 24 then I want to get the data of log file created on 23rd. Log Files in... (7 Replies)
Discussion started by: sureshcisco
7 Replies

5. Shell Programming and Scripting

Getting yesterday's date in shell script

Im in EST, and im using the command CurrentDate=`TZ="EST+24" date +'%y%m%d'` to get the yesterday's date. Does this work perfectly for the boundary conditions of month end or year end(leap year) etc ? (2 Replies)
Discussion started by: prasperl
2 Replies

6. Shell Programming and Scripting

Need help in Shell Script comparing todays date with Yesterday date from Sysdate

Hi, I want to compare today's date(DDMMYYYY) with yesterday(DDMMYYYY) from system date,if (today month = yesterday month) then execute alter query else do nothing. The above requirement i want in Shell script(KSH)... Can any one please help me? Double post, continued here. (0 Replies)
Discussion started by: kumarmsk1331
0 Replies

7. Shell Programming and Scripting

Need script to compress the file for yesterday.

Hi, I want to write script for the last 5 files to compress. #!/bin/sh a= ls -ltr | awk '{print $9}' | head -5 | tail -3 echo `compress $a` exit 0 but this was telling "not found" please modify the script if i am wrong. (5 Replies)
Discussion started by: victory
5 Replies

8. Shell Programming and Scripting

Script to zip the files of yesterday

Hi I've the following requirement, where i need to zip the yesterday files every day . Yesterday's Files touch AB_XYZA_20130930183017.log touch AB_DY_XYZA_20130930183017.log touch AB_GZU_20130930183017.log touch AB_XYZA_20130930180023.log touch AB_DY_XYZA_20130930180023.log touch... (1 Reply)
Discussion started by: smile689
1 Replies

9. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

10. Shell Programming and Scripting

Shell script to compare two files of todays date and yesterday's date

hi all, How to compare two files whether they are same are not...? like i had my input files as 20141201_file.txt and 20141130_file2.txt how to compare the above files based on date .. like todays file and yesterdays file...? (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies
OpenGuides::Search(3pm) 				User Contributed Perl Documentation				   OpenGuides::Search(3pm)

NAME
OpenGuides::Search - Search form generation and processing for OpenGuides. DESCRIPTION
Does search stuff for OpenGuides. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers. SYNOPSIS
use CGI; use OpenGuides::Config; use OpenGuides::Search; my $config = OpenGuides::Config->new( file => "wiki.conf" ); my $search = OpenGuides::Search->new( config => $config ); my %vars = CGI::Vars(); $search->run( vars => \%vars ); METHODS
new my $config = OpenGuides::Config->new( file => "wiki.conf" ); my $search = OpenGuides::Search->new( config => $config ); wiki my $wiki = $search->wiki; An accessor; returns the underlying Wiki::Toolkit object. config my $config = $search->config; An accessor; returns the underlying OpenGuides::Config object. run my %vars = CGI::Vars(); $search->run( vars => \%vars, return_output => 1, # defaults to 0 return_tt_vars => 1, # defaults to 0 ); The "return_output" parameter is optional. If supplied and true, the stuff that would normally be printed to STDOUT will be returned as a string instead. The "return_tt_vars" parameter is also optional. If supplied and true, the template is not processed and the variables that would have been passed to it are returned as a hash. This parameter takes precedence over "return_output". These two parameters exist to make testing easier; you probably don't want to use them in production. You can also request just the raw search results: my %results = $search->run( os_x => 528864, os_y => 180797, os_dist => 750, format => "raw", ); Results are returned as a hash, keyed on the page name. All results are returned, not just the first "page". The values in the hash are hashes themselves, with the following key/value pairs: o name o wgs84_lat - WGS-84 latitude o wgs84_long - WGS-84 longitude o summary o distance - distance (in metres) from origin, if origin exists o score - relevance to search string, if search string exists; higher score means more relevance In case you're struggling to follow the code, it does the following: 1) Processes the parameters, and bails out if it hit a problem with them 2) If a search string was given, do a text search 3) If distance search paramaters were given, do a distance search 4) If no search has occured, print out the search form 5) If an error occured, bail out 6) If we got a single hit on a string search, redirect to it 7) If no results were found, give an empty search results page 8) Sort the results by either score or distance 9) Decide which results to show, based on paging 10) Display the appropriate page of the results INPUT
word a single word will be matched as-is. For example, a search on escalator will return all pages containing the word "escalator". AND searches A list of words with no punctuation will be ANDed, for example: restaurant vegetarian will return all pages containing both the word "restaurant" and the word "vegetarian". OR searches A list of words separated by commas (and optional spaces) will be ORed, for example: restaurant, cafe will return all pages containing either the word "restaurant" or the word "cafe". phrase searches Enclose phrases in double quotes, for example: "meat pie" will return all pages that contain the exact phrase "meat pie" - not pages that only contain, for example, "apple pie and meat sausage". SEARCHING BY DISTANCE
To perform a distance search, you need to supply one of the following sets of criteria to specify the distance to search within, and the origin (centre) of the search: os_dist, os_x, and os_y Only works if you chose to use British National Grid in wiki.conf osie_dist, osie_x, and osie_y Only works if you chose to use Irish National Grid in wiki.conf latlong_dist, latitude, and longitude Should always work, but has a habit of "finding" things a couple of metres away from themselves. You can perform both pure distance searches and distance searches in combination with text searches. OUTPUT
Results will be put into some form of relevance ordering. These are the rules we have tests for so far (and hence the only rules that can be relied on): o A match on page title will score higher than a match on page category or locale. o A match on page category or locale will score higher than a match on page content. o Two matches in the title beats one match in the title and one in the content. AUTHOR
The OpenGuides Project (openguides-dev@lists.openguides.org) COPYRIGHT
Copyright (C) 2003-2008 The OpenGuides Project. All Rights Reserved. The OpenGuides distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
OpenGuides perl v5.14.2 2013-01-11 OpenGuides::Search(3pm)
All times are GMT -4. The time now is 06:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy