Originally posted by Optimus_P why not just run it from cron @ end of bussiness day or even at 11:55pm then u dont have to worry about adding and subtracting from the date.?
Then what if something happens at 11:56, that wont be reflected in the log file. One solution might be to do something like:
I am using this function to calculate yesterday's date and return it in the following format: Jan 09
date '+%b %d %Y' |
{
read MONTH DAY YEAR
DAY=`expr "$DAY" - 1`
case "$DAY" in
0)
MONTH=`expr "$MONTH" - 1`
case "$MONTH" in
... (4 Replies)
hi,
I have to ftp previous days file from a directory to another location. The name of the files are like "xxx20060225" (yyyymmdd format)
"xxx20060226"
ls -lrt xxx*| tail -2| head -1 will give me the file, but if i could get anything... (2 Replies)
Hi,
I am getting some very strange output when using date function in PERL on Solaris.
Infact the month portion is wrong and it is 1 less then the current, means today it is responding as
month =3 , andthis should be 4 ------> April
Any help
my code is
($day, $month, $year) =... (3 Replies)
Hi,
My file format is:
E102,0,21-04-2007,0,2/25/1994,E003,A,125400,10450,60.2884620
E103,0,21/04/2007,0,2/2/1996,E003,A,125400,10450,60.2884620
E104,0,04/21/2007,0,2/2/1996,E003,A,125400,10450,60.2884620
E105,0,21-APR-2007,0,2/2/1996,E003,A,125400,10450,60.2884620... (1 Reply)
Hi,
My file format is:
E102,0,21-04-2007,0,2/25/1994,E003,A,125400,10450,60.2884620
E103,0,21/04/2007,0,2/2/1996,E003,A,125400,10450,60.2884620
E104,0,04/21/2007,0,2/2/1996,E003,A,125400,10450,60.2884620
E105,0,21-APR-2007,0,2/2/1996,E003,A,125400,10450,60.2884620... (1 Reply)
hi,
how can i can pass the value of unixformat to date/time? and how can i retrieve the day/month/year from a date?
thanks a lot for your help
ps:i using php (1 Reply)
:confused: Hi there.
Hi frndz,
I have to script a shell in such a way that by giving the current date, it should give the previous saturday date and next sunday date as output.
eg: Input - 01-01-2008
O/p -
last saturady- 30-12-2007(ddmmyy)
Next Sunday- 05-01-2008
... (14 Replies)
Cal
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
cal | awk '{print $7}'
Sat
13
20
27
In the above output i am missing 6 because the first column is empty so it is shfting.
How... (3 Replies)
I read man page for etc/shadow field..
on the 8th field, i assume that's the field to change account expire date.
my question is:
What value does the 8th field keep? i assume it's 13514 instead of "Date" value such as 11/10/08.
on the man page, it said: " expire value = 13514 = jan 1,... (11 Replies)
Hi ,
I am trying to create a function with below requirements
1. It will take two parameters as Input. Date and Date format
2. Output will be in YYYYMMDD format.
Example 1:
Input: fn_date_reformatter('01-AUG-2014','DD-MON-YYYY')
Output: 20140801
Example 2:
Input:... (4 Replies)
Discussion started by: Anupam_Halder
4 Replies
LEARN ABOUT LINUX
tailf
TAILF(1) Linux Programmer's Manual TAILF(1)NAME
tailf - follow the growth of a log file
SYNOPSIS
tailf [OPTION] file
DESCRIPTION
tailf will print out the last 10 lines of a file and then wait for the file to grow. It is similar to tail -f but does not access the file
when it is not growing. This has the side effect of not updating the access time for the file, so a filesystem flush does not occur peri-
odically when no log activity is happening.
tailf is extremely useful for monitoring log files on a laptop when logging is infrequent and the user desires that the hard disk spin down
to conserve battery life.
Mandatory arguments to long options are mandatory for short options too.
-n, --lines=N, -N
output the last N lines, instead of the last 10.
AUTHOR
This program was originally written by Rik Faith (faith@acm.org) and may be freely distributed under the terms of the X11/MIT License.
There is ABSOLUTELY NO WARRANTY for this program.
The latest inotify based implementation was written by Karel Zak (kzak@redhat.com).
SEE ALSO tail(1), less(1)AVAILABILITY
The tailf command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
13 February 2003 TAILF(1)