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
To represent just how much we’re laughing – because, after all, we’re dashing over snow-capped fields in a sleigh which, in a gaping continuity flaw, is pulled by a horse and not twelve reindeer – we need a huge LOL!

Fear not! Linux comes equipped with a command called banner which will print a message in huge characters for printing on, well, banners, really.

Thus the command

% banner lol

gives output of

#         ####    #
#        #    #   #
#        #    #   #
#        #    #   #
#        #    #   #
######    ####    ######

And if that’s not laughing out loud then I don’t know what is !

Now to unravel some mystery! The next thing that transpires on the magical snow ride is that bells on bobtails ring.

We can add some genuine music to our carol here; Linux offers a way of ringing the system bell. This actually harks back a long way to the early history of computing.

ASCII code number seven – which can be represented by CTRL-G – is known as the “BELL” (or “BEL”) code.

This code doesn’t print anything when sent to an output device but instead makes the terminal beep – or ring its bell.

Therefore

% echo ^G > BobTails

means we’re making bells on bobtails ring by sending a bell to a text file called BobTails.

^G represents CTRL-G but how you type it will differ; you can’t actually type the literal characters ^ and G, that won’t work. You need to either press CTRL and G together or, in some systems, press CTRL-V to indicate you are about to enter a special code, then press CTRL-G. That’s how it works in the vi text editor as well as the command lines of some shells.

This isn’t just some Linux oddity; it’s true of Windows too; if you try printing a program file to the screen (eg TYPE C:\Windows\Explorer.exe) you will get loads of gibberish and the occasional beep.

Every beep is because the file contained a byte with the value 7. When printing to the screen, this is interpreted as ASCII code 7 and the bell rings.

This is part of computing history; early terminals – line printers even – would beep to attract operator attention when a tape needing changing or other important things required aid.

University students have often found merriment in combining the bell with the write command which sends a message to somebody else’s terminal. Certain people would get carried away and use the wall command instead; this was never smart – wall (write all) would send your message to the terminal of every logged in user and was sure to attract sysadmin attention!

With that mystery over, let’s wrap up as well as hit the very jingly chorus!

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