Here is an example:
producing:
and for 5 days in the future:
I did get a compilation error initially, and DGP suggested:
Quote:
Substitute the literal '\0' for NULL
which fixed the problem. I got a segmentation fault at least once (noted by Corona688), so I recompiled with the 32-bit option gcc -o tm2tm tm2tm.c -m32 and that seemed to avoid the segfault.
As usual YMMV; best wishes ... cheers, drl
( Edit 1: correct garbled output from 2014-06-26-11.19.53. )
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi, Robin.
Quote:
Originally Posted by rbatte1
Your Mileage May Vary?
Huh?
Robin
I used YMMV in this sense:
Quote:
Your mileage may vary - (Standard disclaimer attached to EPA mileage ratings by American car manufacturers) A ritual warning often found in Unix freeware distributions and elsewhere. Translates roughly as "Hey, I tried to write this portably, but who *knows* what'll happen on your system?"
Hello all,
Info:
System RedHat 7.5
I need to create a script that based on the creation time,
if the file is older then 5 minutes then execute some stuff, if not exit.
I thought to get the creation time and minutes like this.
CreationTime=$(stat -c %y /tmp/test.log | awk -F" " '{ print... (3 Replies)
Hi all,
System Ubuntu 16.04.3 LTS
i have the following log
INFO 2019-02-07 15:13:31,099 module.py:700] default: "POST /join/8550614e-3e94-4fa5-9ab2-135eefa69c1b HTTP/1.0" 500 2042
INFO 2019-02-07 15:13:31,569 module.py:700] default: "POST /join/6cb9c452-dcb1-45f3-bcca-e33f5d450105... (15 Replies)
Hi, please help with below time conversion to minutes.
one column values:
2 minutes 16 seconds 420 msec
43 seconds 750 msec
0 days 3 hours 29 minutes 58 seconds 480 msec
11 seconds 150 msec
I need output in minutes(total elapsed time in minutes) (2 Replies)
Hello,
date --date '-60 min ago' +'%Y-%m-%d %H:%M:%S,%3N'
Above command gives the date and time minus 60 minutes
but the problem i am facing is, i do not want to hardcode the value 60
it is stored in a variable var=60
now if i run below command , i get error
date --date '-$var min... (3 Replies)
Hi there,
I have a problem with arithmetic ops in awk.
Here is what my script does right now.
while read nr val ; do
case $nr in
400) awk '$2~/eigenvectors/ {print $NF-'$val'};' input.txt >> output.txt;;
esac
done < frames.txtI have a file named frames.txt with two columns (nr and... (2 Replies)
In Redhat it is easy....
date --date="60 minutes ago"
How do you do this in Solaris?
I got creative and got the epoch time but had problems..
EPOCHTIME=`truss date 2>&1 | grep "time()" | awk '{print $3 - 900}'`
echo $EPOCHTIME
TIME=`perl -e 'print scalar(localtime("$EPOCHTIME")),... (5 Replies)
Hello people,
awk '{print $0}' input1.txt input2.txt |sort -u
Will give the union of the 2 files. Similarly what is command to get just the diff data (i.e minus) of the 2 files. Can I use the "diff" command to get just the diff data.
Please let me know.
Regards,
Tipsy. (7 Replies)