'\r' in bash

Sometimes in Bash, you want to display some text in the console and sometimes you may also want to have the ability to overwrite the line that you have just displayed with a new string.

For example, a bash script could display a text “Working..” on the console and then, instead of display “Finished!” to the next line, you want the line that first display “Working…” be cleared and replace with the “Finished!” string.

Here is a little piece of code that could do this:

#!/bin/bash
tput sc
echo -n “Working…”
for i in `seq 1 5000`;
do
echo $i > \dev\null
done
tput el1
tput rc
echo “Finished!”

Opeth – Watershed

“It’s our new record, we think it’s pretty good. We hope you’ll like it.”
Mikael Åkerfeldt

“Pretty good” is definitely a Swedish modesty and certainly not needed here. Watershed brings in more of the Opethian goodness as well as augmentation with the introduction of other new elements to the sound with two debutantes in the lineup. This is coupled with a distinct sense of fun to the proceedings – in one section, tuned arpeggios segue into detuned guitars, into Mikael cracking up, and then into a heavily processed laugh, leading into the next track – all a bit different to the more melodious and less playful transitions we’ve heard from the band before. Each piece seems to be more “intense” in the sense that it is almost “proggy” – increased use of dischords, seemless modulations, polyrhythms – but tastefully without being pretentious or in-your-face. The addition of Per to the lineup has more impact than the band’s previous outing, with extensive use of orchestrations, and an unabashed presence of Moogs throughout.

Official Opeth Website
Official Opeth Myspace
Official Roadrunner Website

WordPress on iPhone

I often use this blog for my own reference, and often access it from my iPhone. Though the iPhone renders the blog wonderfully in full, having to zoom in and out to navigate around the blog is a bit of a pain in the backside.

While browsing through the sea of wordpress plugins – a lot of good stuff, some of them weren’t so helpful – I’ve stumble upon WPtouch, which seems to be the best plugin for making WordPress blogs render in “mobile” mode. It detects if the client is a mobile device (iPhone/iPod/Android), and automatically applies a very well-polished iPhone-themed style with various JQuery visual effects, all with one simple Install -> Activate.

Things I'll Miss About Japan

Ridiculously Fast, Reliable, and Cheap Internet

If you’re living in a residential area, the chances are you’ll have FTH (fibre to the home). Even split between the entire flat building (or マンション) you can still get download speed from between a few hundred KB to up to about 10MB. On a good day an episode of a TV show (170MB – 300MB) can take less than 5 minutes!