03-25-2010
Quote:
Originally Posted by
Krrishv
Hi,
I have a script which runs on specific sunday. If that script runs on the sunday i want to execute another script on following wednesday.
I have a log for that server. My wednesday scripts needs to check the sunday run log timestamp and if it matches it should run. Please help.
Thanks,
Krish
You could schedule your wednesday's script in cron daemon and begin it by matching sunday logfile.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I've to validate a date input for the format YYYYMMDD. The input should be of 8 digits with only numeric values.
I tried the following
echo $1 | grep '^\{8}$/p'
if
then
echo "Valid"
else
echo "invalid"
I get the error,
grep: RE error 16: Bad number.
Any help... (3 Replies)
Discussion started by: sumesh.abraham
3 Replies
2. Shell Programming and Scripting
I want a sample Date validation script using if loops.
The script should first compare "year".If the year is lesser than the current year,It should go for "month" checking.
I have the script that splits the date into year,month and date.I want only the checking part.
My if loop checking is not... (4 Replies)
Discussion started by: dave_nithis
4 Replies
3. Shell Programming and Scripting
Hi
I have below file with 3 rd column as date ....i want to make 3 column to mm/dd/yyyy .
in the below file 2 row date is like 1/23/1994 so i want to append '0'
to month i,e. 01/23/1994 and in the 3 row date is like 6/4/1994 ---so i want this to 06/04/1994
Source:... (1 Reply)
Discussion started by: satyam_sat
1 Replies
4. Shell Programming and Scripting
Hi,
I've made a very basic date validation script, but the syntax of the until condtion is wrong, could someone have a quick look and correct it please?:)
Thanks for any help.
echo -n "Please enter your date of birth (dd-mm-yyyy): "
read dob
day=${dob:0:2} month=${dob:3:2} year=${dob:6:4}... (1 Reply)
Discussion started by: mustaine85
1 Replies
5. Shell Programming and Scripting
the user have to input the date format in mmddmmhhyyyy (month,date,minutes,hour,year)
i want a shell script to check whether the user has properly input in the above said manner.
kindly advice (2 Replies)
Discussion started by: vkca
2 Replies
6. Shell Programming and Scripting
I have a script which is take date as parameter
sh abc.sh <2010-02-01>
#!/sh/bin
my_date=$1
#Here i want to two diffrent dates
## 3 Days before
##date14query=$mydate - 4 (it will be 2010-01-28)
##date24query=$mydate +4 (it will be 2010-01-05)
#Please Help (3 Replies)
Discussion started by: pritish.sas
3 Replies
7. UNIX for Dummies Questions & Answers
Dears,
I am working on a batch that processes file with name containing date prefix eg., 20101222_file.dat.
The logic is to process files in order. Eg., 20101225 must be processed only after 20101222.
Ok first glance it looked simple, it use a variable to check this date value as number and... (2 Replies)
Discussion started by: naraink
2 Replies
8. Shell Programming and Scripting
File contains below data,how to validate the date using awk command or any command.
date formate is fixed as "YYYYMMDD"
test1|20120405
test2|20121405
output should be:
test1|20120405
Thanks (2 Replies)
Discussion started by: bmk
2 Replies
9. Programming
Hi All,
We need to create the custom function to pass the parameter is date.if it is valid return 1 else 0
return should be 1
select is_date('2012-09-17');
return should be 0
select is_date('2012-79-17');
Thanks (2 Replies)
Discussion started by: bmk
2 Replies
10. What is on Your Mind?
Hi folks,
I new to shell script .
I want to know how to validate a String as valid date
example:
20150712 ---> valid date
20160524-->valid
201605T12-->invalid date
12341234--->invalid date
we need to valid string( yyyymmdd) to date in SunOS 5.10
please give some idea to validate... (9 Replies)
Discussion started by: srinadhreddy27
9 Replies
LEARN ABOUT DEBIAN
lr_vendor_cron
LR_VENDOR_CRON.IN(1) LogReport's Lire Documentation LR_VENDOR_CRON.IN(1)
NAME
lr_vendor_cron - generate Lire reports from all known log files on the system
SYNOPSIS
lr_vendor_cron daily|weekly|monthly
DESCRIPTION
lr_vendor_cron is designed to be invoked by cron. On systems supporting /etc/cron.d/, this script can be invoked by creating
/etc/cron.d/lire, which should read e.g.:
02 5 * * * root /usr/sbin/lr_vendor_cron daily
22 5 * * 0 root /usr/sbin/lr_vendor_cron weekly
42 5 1 * * root /usr/sbin/lr_vendor_cron monthly
lr_vendor_cron reads files /etc/sysconfig/lire.d/*.cfg and /etc/default/lire.d/*.cfg. For each log file, such a file should exist. The
files should set the following shell variables:
daemon
the name of a binary which generated the specific log. This is used to test wether the *.cfg-file is suitable for the current system.
If you'd like to generate a log for which no daemon is present on the current system, just use a placeholder like "daemon=/bin/true".
service
a Lire service, e.g. sendmail,
logfile
e.g. /var/log/mail.log.1.gz,
filter
e.g. 'gzip -dc' or 'zcat | grep sendmail', and
rotateperiod
one of the supported lr_vendor_cron arguments.
extraopts
optional: extra options passed to lr_log2mail(1). Set this to e.g. '--template www_local'.
After parsing the configuration files, lr_vendor_cron invokes lr_log2mail(1) on the `filter'ed log file. Reading and filtering the log is
done as root, lr_log2mail is run as user lire, using su(1). Output is fed to logger(1).
SECURITY
lr_vendor_cron is supposed to be run as root. However, please note that this script is distributed WITHOUT ANY WARRANTY. If you don't
like to run such a script as root, make sure your lire user has read access to all log files you'd like to get processed, and adapt this
script. We supply this script mainly for people building packages. On many Unix and GNU/Linux distributions, it's hard to enforce log
file readability by the lire user. This script is mainly a way to work around this.
ENVIRONMENT VARIABLES
lr_vendor_cron honours DEBUG, CONFDIR, PRIORITY (for logger(1) call), and LIREUSER. Beware! PRIORITY as used here is independent of the
LR_FACILITY as set in /etc/lire/defaults. This script does not use any of the settings in /etc/lire/defaults.
VERSION
$Id: lr_vendor_cron.in,v 1.14 2006/07/23 13:16:33 vanbaal Exp $
COPYRIGHT
Copyright (C) 2002, 2003 Stichting LogReport Foundation LogReport@LogReport.org Copyright (C) 2005 Joost van Baal
This program is part of Lire.
Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with
http://www.gnu.org/copyleft/gpl.html.
AUTHORS
Francis J. Lacoste <flacoste@logreport.org>, Joost van Baal <joostvb@logreport.org>
Lire 2.1.1 2006-07-23 LR_VENDOR_CRON.IN(1)