home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 43.10 Filename Headers Above Files Without pr Chapter 43
Printing
Next: 43.12 Typesetting Overview
 

43.11 Big Letters: banner

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

I made that with the System V version of banner by typing:

banner "read this."

Each argument (10 or fewer characters) is printed to the standard output ( 13.1 ) in letters like those. I quoted my two words to keep them together. If you type separate arguments, banner will print them down the page.

The Berkeley version of banner prints big letters, too. But they're much bigger and they're output sideways for a continuous-form printer. These banners are great for parties. The default is 132 characters high, enough for a wide printer or a smaller printer in compressed-type mode. Use the -w option to get 80-column width; add a number for a different width, like -100 , to get 100-character width.

This program is usually in the /usr/games directory. Although you can type the message on the command line, it's easier to type at the (undocumented) Message: prompt because you won't have to quote special characters. For example:

% 

/usr/games/banner -w | lpr -Ptractor


Message: 

* * Happy Birthday, Alice!! * *

If you don't have a continuous-form printer, you can piece together separate pages with a csh foreach loop ( 9.11 ) or an sh for loop ( 9.12 ) , some scissors, and a roll of tape ;-) :



'..'
 


% 

foreach page (Pay me '$10, '000)


? 

/usr/games/banner -w "$page" | lpr -Plaser


? 

end

Remember to quote special characters.

- JP


Previous: 43.10 Filename Headers Above Files Without pr UNIX Power Tools Next: 43.12 Typesetting Overview
43.10 Filename Headers Above Files Without pr Book Index 43.12 Typesetting Overview

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System