15
Nov

Prefix command output in a shell with timestamp

   Posted by: Kristian Rønningen in linux

So I was writing this script that logged certain things to a file using a regular redirect. My script was running various commands that outputted a random amount of lines, all in random formats. I wanted to have a timestamp prefixing all of that, similar to what you get in logs written by syslog. I searched around a bit, and ended with this:

Of course if you want a different timestamp, you just change the arguments you pass to strftime. Quite handy!

Tags: , , ,

22
Oct

Tail with word highlighting

   Posted by: Kristian Rønningen in linux

If you’ve ever ran tail -f on a busy file and tried to find certain words or patterns as they fly by, then this little “trick” might be of some help:

Tags: , , , ,

17
Oct

Random photos 2005

   Posted by: Kristian Rønningen in Photos

As promised: Here’s some more! This time it’s from 2005. Apparantly 2004 was a bad photoyear for me, so I’ll just silently skip that.

Tags:

16
Oct

New theme for 42.no

   Posted by: Kristian Rønningen in Uncategorized

This new theme is called Aspire, and made by InfoCreek.com. I think it looks pretty cool. Simple, but yet.. with swirly things. Also added a new gallery plugin, NextGEN Gallery so maybe I’ll start posting some of the photos I shoot. You can see a random photo in the sidebar. What do you think? :)

Tags: ,

16
Oct

Random photos 2003

   Posted by: Kristian Rønningen in Photos

Looking through my old photos from way back, I found these. More to come.

Tags: