awk to find a substring

This is pretty simple when you see it but took me a few minutes to figure it out:
The API is here: http://people.cs.uu.nl/piet/docs/nawk/nawk_92.html

$ export steo=D:\/dev_future\/
$ awk 'BEGIN { print substr("'$steo'", 3) }'
/dev_future/

The gotcha for me was the “‘$steo'” bit to read the environment variable. Easy if you know the syntax!

Advertisements

Kernel Hacking

I’ve been getting a little frustrated of late with this. Mainly because of turnaround times in rebuilding the kernel etc. I was looking at the kernel sources and sticking in printks here and there to try and make things clearer for me. But the time it took to rebuild the kernel, reinstall it, reboot it and grep for my lines was/is killing me. Plus, if I break the kernel I gotta go back to my working one and do it right this time. It was really difficult to make any progress so I started looking for other ways.

Continue reading

Upgrading kubuntu 9.10 to use KDE 4.4

KDE 4.4 was released on the 2nd of March 2010:

http://www.kde.org/announcements/announce-4.4.1.php

I am currently running Kubuntu 9.10 which by defualt has KDE 4.3.2 but the KDE 4.4 packages are available for the adventurous. So, why would you want to upgrade? Well, 4.4 is a bigger number than 4.3 right so it is therefore better 🙂 KDE 4.4 is based on QT 4.6 versus KDE 4.3 QT 4.5 so that comes with its own benefits. Also, if you do any KDE development you will need to have the latest and greatest KDE to develop off the trunk.

So if you can’t wait for the packages to reach the main repositories, here is how to do it, it is quite simple:

sudo add-apt-repository ppa:kubuntu-ppa/beta
sudo apt-get update
sudo apt-get dist-upgrade

Remember though, it’s beta, so if anything goes wrong you could be stuck. Roll back is not something that aptitude does very well at all.