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. 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
3. Shell Programming and Scripting
I have a requirement to find long running instances for notifying the stake holders based on the triggered time in AIX.
I am not sure how to convert the triggered time to epoch seconds.
For example :
Current triggered time of instance is 13:06:19 -> how to convert this into epoch in the... (5 Replies)
Discussion started by: chandu123
5 Replies
4. 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
5. 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
6. Shell Programming and Scripting
guys I need emergency help with below shell script assignment..am new to shell script
Write a Shell script to automatically check that a specified user is logged in to the
computer.
The program should allow the person running the script to specify the name of the
user to be checked, the... (2 Replies)
Discussion started by: gurmad
2 Replies
7. HP-UX
Hi!
I'm writing a kernel module on HP-UX 11.23,
and I can't find how to get the “number of seconds since epoch” (midnight of Jan 1st 1970).
Actually I'm trying to find an equivalent to the user-space “time()” function...
I found that in Linux, one can access “xtime.tv_sec” in the... (1 Reply)
Discussion started by: nati
1 Replies
8. Shell Programming and Scripting
Guys, i have a question...
I have 2 sets of data say "a" and "a+1" which has values in epoch time..
Question is... if i were to get the time difference where diff = "a+1" - "a"
can i convert it back to real time duration after the subtraction...
OR i need to convert em first before i do the... (1 Reply)
Discussion started by: 12yearold
1 Replies
9. Shell Programming and Scripting
Hi All,
I need a script which does,
script check a file every 15 second, if file not exist, it will create a log file.
how can I do it ?
thanks
Alice (4 Replies)
Discussion started by: alisevA3
4 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
i am trying to figure out how i can get a 'Nix box to display
epoch time. Is there a command to do this? Do I know what I am talking about or am I an Idiot? Wait dont answer that last question!!!!! Thanx in advance!!!:confused: (2 Replies)
Discussion started by: Bodhi
2 Replies