10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello, am not able to subtract timestamps in milliseconds.
I extract the timestamp as a string, and then try to subtract the two, but since it is a string, system just outputs 0
awk -F"," 'substr($1,0,13) - substr($2,0,013)' File
where $1 and $2 are the timestamps in the format... (4 Replies)
Discussion started by: sidnow
4 Replies
2. Shell Programming and Scripting
So basically I have a log file and each line in this log file starts with a timestamp:
MON DD HH:MM:SS
SEP 15 07:30:01
I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
3. Shell Programming and Scripting
Hello ,
I am working on AIX. I have to convert Unix timestamp to normal timestamp. Below is the file. The Unix timestamp will always be preceded by
EFFECTIVE_TIME as first field as shown and there could be multiple EFFECTIVE_TIME in the file : 3.txt
Contents of... (6 Replies)
Discussion started by: rahul2662
6 Replies
4. Shell Programming and Scripting
Hi Friends,
I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only
I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies
5. Shell Programming and Scripting
I have a shell script which prints a variable to a text file (sorry if this is the wrong terminology, I'm new to this):
awk `{sumdiffsqt+=$1;stdevt=sqrt(sumdiffsqt/('${n}'-1));errt=stdevt/sqrt('${n}')} END {print '$period',stdevt,errt}' diffsqt.txt >> ${xstation1}_${xstation2}_tt.err
I need... (4 Replies)
Discussion started by: claire.a
4 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies
7. Programming
Hi,
As all of us know that size of int is machine as well as compiler dependent
we can get the range and size of an int , float and char etc in
/usr/include/limits.h
header file of a compiler
but could any one tell me how to get info of precision of float and ... (6 Replies)
Discussion started by: useless79
6 Replies
8. Shell Programming and Scripting
Hi,
I have a log file that has the date in this format "2006-05-30_13:14:04,256". I need to find the time difference between two log entries in milliseconds.
How to achieve this in AWK/GAWK script? :confused: (2 Replies)
Discussion started by: omprasad
2 Replies
9. Programming
Hi All,
Urgent! Just a newbie needing advice.
Has anybody have a sample C script code in Unix to display time with milliseconds?
Most of the research I'm doing is up to the seconds format only.
Thanks!
Leidail (3 Replies)
Discussion started by: rezlez
3 Replies
10. UNIX for Dummies Questions & Answers
I need to find out the precision on a solaris machine using the unix terminal.
How do I find this out?
Specifics needed:
How are single precision numbers represented (8 or 16 bit)
How are double precision numbers represented (16 or 32 bit)
How are they stored. ( some computers store numbers... (1 Reply)
Discussion started by: Townsfolk
1 Replies