Follow the Australian Telecommunications scene NEWSLETTER- FREE TRIAL
The Linux distillery
Bringing the world of Linux to you, David cuts through the tech and shows you how it works and how to use it, in terms that apply to any distro. RSS
Technology news and Jobs arrow The Linux distillery arrow A Linux Christmas Carol explained
A Linux Christmas Carol explained E-mail
by David M Williams   
Sunday, 28 December 2008
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







 
< Next story in category   Previous story in the category >
iTWire user statistics Visitors last 30 days
694,279
Subscribers 15,210
#1 independent technology news advertise here
  •   *  
  • Search
  • AdvSeach
  • Login
  • Events
  • FreeStuff

- Advertisement -

Featured Whitepapers

Follow iTWire on Twitter

About iTWire

iTWire is all about technology news, information, jobs and community for the IT and telecommunications industry professional. Subscribe to our free ICT daily newsletter