Monday, 16 January 2006

Print a large banner on your terminal

I still remember those days clearly when I was taking a short term course in Unix. The Unix flavour being SCO Unix ver 5.0. The first command we were introduced to in Unix by the instructor was the 'banner' command.

'banner' is a command which prints a high resolution text banner on the system console or if you have a printer connected to your machine, you can redirect the output to the printer. This utility is available on all Linux / Unix platforms.

For example, to print my name as a large banner, I give the command as follows:
$ banner -w 60 Ravi
The above command will print my name on the console with a width of 60 characters. If the -w option is omitted, it prints my name in the default width of 102 characters. The character used to print the name is '#'.

Fig: My name printed on the terminal
You can also redirect the output to a printer as follows:
$ banner -w 60 Ravi > /dev/lp0
We had great fun by printing out a variety of text on the console using the banner command. In some ways, it is a pity that nowadays, the first thing a new user to Linux or Unix do is check out the GUI or the games installed in them.

No comments:

Post a Comment