10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have scenario where i have to compare two dates.
I thought of converting them to epoch seconds and do a numeric comparison.
This works fine on Linux systems.
$ date -d '2015/12/31' +%s
1451538000
$ date +%s
1449159121
But we don't have -d option in HPUX.
What would be... (5 Replies)
Discussion started by: veeresh_15
5 Replies
2. Shell Programming and Scripting
I have a list of epoch times delimited by "-" as follows:
1335078000 - 1335176700
1335340800 - 1335527400
1335771300 - 1335945600
1336201200 - 1336218000
The corresponding dates are:
20120422 1000 - 20120423 1325
20120425 1100 - 20120427 1450
20120430 1035 - 20120502 1100 ... (3 Replies)
Discussion started by: alex2005
3 Replies
3. UNIX for Dummies Questions & Answers
Below is the sample logfile:
Userids Date Time
acb Checkout time: 2013-11-20 17:00
axy Checkout time: 2013-11-22 12:00
der Checkout time: 2013-11-17 17:00
xyz Checkout time: 2013-11-19 16:00
ddd Checkout time: 2013-11-21 16:00
aaa Checkout... (9 Replies)
Discussion started by: asjaiswal
9 Replies
4. Red Hat
how to verify that the following is epoch time.
that is if i have given some random value like 34600 , how can i know it is
epoch seconds (5 Replies)
Discussion started by: ramsavi
5 Replies
5. Shell Programming and Scripting
Hello All,
I have a Perl script I'm writing where I ask the user to enter a "start time" for something. The "$start_time" will be in the format of:
# The Time CLI Option Can be in the format of:
--start-time="1day"
--start-time="2hours"
--start-time="45min"
... (1 Reply)
Discussion started by: mrm5102
1 Replies
6. Shell Programming and Scripting
I am trying get time difference of two dates in secs. Initially I want to convert a standard date format to epoch for two dates and then subtract the two epoch dates.
Example :
date -d "2007-09-01 17:30:40" '+%s'
But this gives me below error
date: illegal option -- d
Usage: date
OS: AIX... (6 Replies)
Discussion started by: bpaac
6 Replies
7. Shell Programming and Scripting
Dear experts,
I have an epoch time input file such as : -
1302451209564
1302483698948
1302485231072
1302490805383
1302519244700
1302492787481
1302505299145
1302506557022
1302532112140
1302501033105
1302511536485
1302512669550
I need the epoch time above to be converted into real... (4 Replies)
Discussion started by: aismann
4 Replies
8. Shell Programming and Scripting
hi guys,
i need to know how to get the current date/time in seconds and i want to be able to do this in a one liner. like say for instance, if want to get what the time is right now, i'll issue a command like this:
## perl -e ' print scalar(localtime(time + 0)), "\n"'
Tue Jul 13 17:45:50... (4 Replies)
Discussion started by: SkySmart
4 Replies
9. UNIX for Dummies Questions & Answers
Hi everybody,
I want to get the current time in epoch format (in UNIX or Korn Shell) and store it in a variable called
currentTime. Any response will be highly appreciated:)
Thanks in advance,
omoyne:D (8 Replies)
Discussion started by: omoyne
8 Replies
10. Shell Programming and Scripting
Hi guys,
I know that this topic has been discuss numerous times, and I have search the net and this forum for it.
However, non able to address the problem I faced so far.
I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies