Warning this article may contain opinions of the author that you and iTWire don't necessarily agree with. Don't let them get away with it - have your say with a comment!

No. 1 Story

ACCC clears Optus to scrap HFC network and use NBN instead

The ACCC has cleared, provisionally, the proposed deal between Optus and NBN Co under which Optus is to be paid around $800m to shut down its HFC network and transfer customers onto the NBN. read more

A Linux Christmas Carol explained

Opinion and Analysis

On Christmas Eve I suggested what "Jingle Bells" may look like if it were a Linux shell script. Here it is for those who missed out, and some interpretation for those who didn't.

Maybe I'm showing my age, but I had a few people write to tell me they didn't quite get it. The main stumbling block was just what on earth this "^G" thing was supposed to mean.

So, here’s a bit of a helping hand – especially for my Windows’ friends who may not be so familiar with a command line.

First, you can find the original Jingle Bells shell script here. Let’s break it down.

I started off a bit lame – sorry. For “Dashing through the snow” I invoked the Linux command “time.” This takes as a parameter another command and measures how long it takes to execute – both in terms of real time and CPU time.

% time snow

is thus meant to express the timing of a fictitious command called ‘snow’ – now, being performance junkies, we want snow to run swiftly. You might even say we want its execution to dash through!

Next, as you know, we must go over fields in a one horse open sleigh. With sleight of hand I’m invoking another fictitious command called ‘OneHorseOpenSleigh’ but this time when we run it we’ll send the output to a text file called fields. The > symbol, when used on the command line, will redirect output from the screen to the named file. This is true also of the Microsoft Windows command line.

% OneHorseOpenSleigh > fields

Our mode of transportation is such great fun that we’re laughing all the way. Of course, in today’s contemporary jargon you might say we’re “lol”’ing ... or “laughing out loud.”

(As an aside, do people really roll around on the floor laughing at the simplest things? I’m more of a CSAK – “chuckling silently at keyboard” – person, myself.)

I could have used

% echo lol

to effectively print “lol” on the screen. However, does that really represent the magnitude of our laughter and merriment as embodied in Jingle Bells?

No, something much louder and magnificent is needed here. And Linux has just the thing for the job!

CONTINUED