07-17-2013
"-d" is a non-standard GNU extension of the "date"-utility and won't work in probably any POSIXly-correct environment, including AIX. There is an abundance of threads about how to find out yesterdays date in various formats using POSIX tools, just give it a search.
I hope this helps.
bakunin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am new to using Sed. I have a file containg lines like the following:
INFORM----Test.pc:168:10/11/05 12:34:26 > some text goes here..
TRACE-----Test.pc:197:10/11/05 12:34:26 > some text goes here..
My requirement is to replace 10/11/05 12:34:26 with a string <RUNDATE> (including <... (4 Replies)
Discussion started by: Hema_M
4 Replies
2. Shell Programming and Scripting
I have two servers which are not in sync.
I need to write a script that checks the time on the corresponding server and another script to call the above script on both the servers simulataneously to check if there is a time difference.
Can anyone provide me with such scripts as I am new to... (3 Replies)
Discussion started by: ravneet123
3 Replies
3. Shell Programming and Scripting
Hi All,
The developers want me to search and capture the weblogic log, you know this big logs of htmls.
They want to me to have ranges on the date and time. Like
from "2010-01-20 14:04:46,186" to "2010-01-20 15:00:12,490"
I can only do this,
cat /usr/local/bea/logs_prod1/debug.log |... (1 Reply)
Discussion started by: itik
1 Replies
4. Linux
Hi All,
The developers want me to search and capture the weblogic log, you know this big logs of htmls.
They want to me to have ranges on the date and time. Like
from "2010-01-20 14:04:46,186" to "2010-01-20 15:00:12,490"
I can only do this,
cat /usr/local/bea/logs_prod1/debug.log... (1 Reply)
Discussion started by: itik
1 Replies
5. Shell Programming and Scripting
How to check when was the last time the crontab was updated and also what was the modification done ? (2 Replies)
Discussion started by: mail2sant
2 Replies
6. Shell Programming and Scripting
Hi All,
I have a process which after some time continues move a files to some folder(say the name of the folder is logdir)
What i am trying to do is as the files are coming to the logdir folder, I want the latest updated time and date
of the folder in PERL. (1 Reply)
Discussion started by: parthmittal2007
1 Replies
7. Shell Programming and Scripting
HI,
I want to search for a logs which are trace between specific date and time from logs file.
My logs are generated like this :-
Tue Jun 18 05:00:02 EEST 2013 | file_check.sh| Message:script has files to process.
Thu Jun 20 05:00:02 EEST 2013 | file_check.sh| Message:script has files to... (5 Replies)
Discussion started by: ketanraut
5 Replies
8. UNIX for Dummies Questions & Answers
I need to check 1 log file, which is logging:
2014-08-18T09:10:39+02:00 user: XXXXX START FEATURE
2014-08-18T09:10:39+02:00 user: XXXXX FINISH FEATURE
I first need to check that the START FEATURE starts and finish on the same time/date for the same user, which is different each time START... (2 Replies)
Discussion started by: TheBest43
2 Replies
9. Shell Programming and Scripting
Hi,
My goal is to monitor the response time from the access logs of nginx server. I am using gawk to print the needed fields - 'response time' and 'name of the service' from nginx logs.
Command: gawk '($6 ~ /cloudservice/) {print $10, $6}' access.log
Output:
0.645 /nc/cloudservice... (6 Replies)
Discussion started by: nshah11
6 Replies
10. Shell Programming and Scripting
Appreciate help for the below issue.
Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt..............
1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies
LEARN ABOUT FREEBSD
sttime
sttime(3) ShapeTools Toolkit Library sttime(3)
NAME
stMktime, stWriteTime - date and time handling
SYNOPSIS
#include <config.h>
#include <sttk.h.h>
time_tstMktime (char *string);
char*stWriteTime (time_t date);
DESCRIPTION
stMktime scans the given string and tries to read a date and time from it. It understands various formats of date strings. The following is
a list of all valid formats, optional parts in brackets.
[Tue] Jan 5[,] [19]93
This includes the standard asctime(3) format.
Jan 5 With no year given, the year defaults to the current year.
[19]93/01/05 This notation requires month and day represented by exactly two digits.
5.1.[19]93 This is the usual German notation.
5.1. German notation referencing the current year.
A certain time, given together with the date must always have the following form.
hours:minutes[:seconds]
Each of the fields must be an integer value within the proper range (hours: 0-23, minutes and seconds: 0-59). Values below
10 may be written as one digit numbers.
The time value may be placed anywhere in the date string: at the beginning, at the end, or somewhere in the middle. Any amount of white-
space may be given between a field of the time value and the separating colon. The time is always considered to be local time.
stWriteTime generates a time string similar to asctime(3) from its date argument.
SEE ALSO
asctime(3)
BUGS
Time Zone Names within the time string (like `MET') are not handled properly. In most cases they will cause a failure.
sttk-1.7 Thu Jun 24 17:43:35 1993 sttime(3)