On Commandline:
perl -e 'print scalar localtime(shift),"\n"' 1224687639;
Wed Oct 22 16:00:39 2008
In a script
---
#!/usr/bin/perl
# Date to timestamp (date2stamp.pl)
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
printf "%4d-%02d-%02d %02d:%02d:%02d\n",$year+1900,$mon+1,$mday,$hour,$min,$sec;
---
>date2stamp.pl
2008-10-26 23:43:33
To timestamp using Awk:
strftime("%Y-%m-%d %X", 1224687639)
eg
awk -F, '{OFS=","; print "\""$1"\"", strftime("%Y-%m-%d %X", substr($2,1,10))"."substr($2,11), $3, $4, $5, 0}'
Search This Blog
Code snippets and memory joggers
Sunday, October 26, 2008
Saturday, April 5, 2008
The vaguaries of 64 bit OSes
A change of job and a change of laptop!
T61 4GB RAM
So I begin with Ubuntu 34 bit, this works fine but doesn't see all the Memory, of course. but it gets me going for a few days while i prove i can do the job!
So an 'upgrade' to the 64 bit version!
Skype don't do a 64 bit version so heaps of downloading of libraries and that is back to running.
wireless networking seems to drop out after installing the security updates, and a few other things are unuseable :(
Now trying SuSE, now on '5 hours later' on the 5th attempt!
T61 4GB RAM
So I begin with Ubuntu 34 bit, this works fine but doesn't see all the Memory, of course. but it gets me going for a few days while i prove i can do the job!
So an 'upgrade' to the 64 bit version!
Skype don't do a 64 bit version so heaps of downloading of libraries and that is back to running.
wireless networking seems to drop out after installing the security updates, and a few other things are unuseable :(
Now trying SuSE, now on '5 hours later' on the 5th attempt!
Sunday, February 10, 2008
Welcome to my blog
I have 3 brilliant children. I work as a software engineer for a company with an office in Bath, UK.
Subscribe to:
Posts (Atom)
About Me
- Keith
- I love to travel and meet new people, motorbikes, moving my body through dance, martial arts and yoga. I'm a lifelong learner interested in how things work, and the way people think and make their decisions. My choice of superpower would be to speak with someone and understand them completely, including their intention and for me to be able to communicate my intention to them clearly in their own language. As an Amazon Associate, I may earn from links to qualifying purchases.