10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can we convert date like format 20181004171050 in seconds ?
I can able to convert till date but failing for HHMMSS.
date -d "20181004" "+%s" output as 1538596800 .
But when i add hhmmss it is failing date -d "20181004172000" "+%s" result Invalid date
Regards (16 Replies)
Discussion started by: sadique.manzar
2. Shell Programming and Scripting
I have a list of time spans in seconds, and want to compute the time span
I am coding in bash and have coded the following. However, the results are
wrong as "%.0f" rounds the values.
tmspan(hrs,min,sec): 7.16 429.89 25793.50
ss:... (2 Replies)
Discussion started by: kristinu
3. Shell Programming and Scripting
I am trying to create a script that will take epoch (input from command line) and convert it into a readable format in bash/shell
---------- Post updated at 08:03 PM ---------- Previous update was at 07:59 PM ----------
read -p "Please enter a number to represent epoch time:"... (9 Replies)
Discussion started by: sprocket
4. UNIX for Dummies Questions & Answers
I have a Raspberry Pi that logs some temperatures using Onewire. Data is collected with RRDTool.
The command sudo rrdtool fetch ute_temp.rrd AVERAGE -s -1h > ./test.log
and then cat test.log gives the result
How do I write a script that converts the Epoch time... (4 Replies)
Discussion started by: nilekl
5. Shell Programming and Scripting
# date +%s -d "Mon Feb 11 02:26:04"
# perl -e 'print scalar localtime(1360567564), "\n";'
Mon Feb 11 02:26:04 2013
the epoch conversion is working fine. but one of my application needs 13 digit epoch time as input
rather than 10 digit epoch time 1360567564... (3 Replies)
Discussion started by: vivek d r
6. UNIX for Dummies Questions & Answers
I'd like to convert a date string in the form of sun aug 19 09:03:10 EDT 2012, to unixtime timestamp using awk.
This is how each line of the file looks like, different date and time in this format
Sun Aug 19 08:33:45 EDT 2012, user1(184.108.40.206) all: test on the 17th
... (2 Replies)
Discussion started by: bkkid
7. Shell Programming and Scripting
I can not find a working script or way to do this on sun solaris , can someone please guide me?
e.g 1327329935 epoch secs = 012312 (ddmmyy)
thanks (5 Replies)
Discussion started by: aliyesami
8. Shell Programming and Scripting
Thanks bartus11 yesterday's code worked fine for me.
In meantime I've found another "issue".
As you can see highlighted, the time format in my original input in case of two rows which should be duplicited ,is differentwhat I need to do is to convert to this format "20110607-08:03:22"... (4 Replies)
Discussion started by: hernand
9. UNIX for Advanced & Expert Users
I have an AIX 5.3 system and i created a script to get the last login of users.
The script goes like this:
LAST_LOGIN=`lsuser -a time_last_login $cur_user`
TIME_LOGIN=`perl -e 'print scalar localtime("$LAST_LOGIN")'`
Actually what i do in these two lines is to set a variable... (2 Replies)
Discussion started by: omonoiatis9
10. Shell Programming and Scripting
I need help to do some calculation in script.
I have a monitor program (munin) that I would like to log uptime information from a server.
The script looks like this (not complete):
### Config Start
# Reads the server parameters using the HTTP port with... (7 Replies)
Discussion started by: Jotne