ArticleslgStudy

science

Banner (Unix)

Banner (Unix) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Banner (Unix) rather than just read about it. In short: The banner program on Unix and Unix-like operating systems outputs a large ASCII art version of the text that is supplied to it as its program arguments. One use of the command is to create highly visible separator pages for print jobs.

Key takeaways

  • Banner (Unix) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Banner (Unix) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Banner (Unix) from memory before moving on to harder problems.

Reference excerpt

The banner program on Unix and Unix-like operating systems outputs a large ASCII art version of the text that is supplied to it as its program arguments. One use of the command is to create highly visible separator pages for print jobs.

Operation Each argument is truncated at 10 characters and printed on a "line" of its own. To print multiple words on a single line, they must therefore be passed as a single argument, which is done from the shell by escaping or quoting the words as appropriate. A related and more flexible program is FIGlet, which can display text in different fonts and orientations.

Implementation The way that the program is implemented internally is antiquated. The character fonts used are hardwired into the program code itself, as statically initialized data structures. Two data structures are used. The first is a data table comprising a sequence of printing instructions that encode the bitmap for each character (in an encoding specific to the banner program). The second is an index into that table that indicates, for each character code, where the printing instructions for that character begin and end. Both data structures were hand-written. Spinellis observes that it is "difficult to come up with a more error-prone and unmaintainable data format". He observes a stark contrast between the source code of the banner program and automatically generated source code for encoding computer fonts into program data (using the 6-by-10 font data in the source code of the mac68k port of NetBSD for comparison). The automatically generated data are commented, documenting with ASCII art how the bit patterns were derived. The automatically generated data were generated from a bitmap file, itself generated using a bitmap creation/editing program with a graphical user interface. And the automatically generated data are organized in a straightforward and obvious manner — a fixed-length sequence of unencoded bytes for each glyph. Spinellis further observes that in modern computer systems it is seldom sensible to embed such data into the program executable image itself, the performance gains of doing so being negligible. Doing so makes it difficult to adapt the program to different locales, or to maintain the program. The more preferred approach in modern systems is to store such data in a separate data file, distinct from the program executable image file, or in a resource fork of the program, that the program reads at run-time.

Versions A partial list of versions:

By AT&T, in UNIX System V. By Cedar Solutions. Runs on modern Linux systems as of 2008. Prints horizontally only with a fixed size. By Mary Ann Horton at the University of California Berkeley, distributed as part of the bsdmainutils package, under the name printerbanner. Runs on modern Linux, GNU Hurd, and Mac OS X systems as of 2008. Prints vertically with variable size font.

Example output From the terminal-oriented banner program:

One letter from the printer-oriented banner program as usually found in BSD and derivatives:

Display a continuous clock for approximately 1000 seconds:

See also FIGlet – a Linux utility that provided the same functionality when the banner font is selected

Notes

References

Further reading Amir Afzal (2008). "The banner command". UNIX Unbounded. Prentice Hall. pp. 462–463. ISBN 0-13-119449-6.

External links banner(6) – 4.2BSD Games Manual banner(6) – FreeBSD Games Manual

Worked examples

Example 1 — a first encounter with Banner (Unix)

Start with the simplest possible case. Write down what Banner (Unix) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Banner (Unix) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Banner (Unix) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Banner (Unix)

In research
Banner (Unix) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Banner (Unix) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Banner (Unix) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Unix text processing utilities, so understanding it makes those chapters shorter.
In everyday life
Look for Banner (Unix) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Banner (Unix)” →

How to study Banner (Unix) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Banner (Unix) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Banner (Unix) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Banner (Unix) in simple terms?

The banner program on Unix and Unix-like operating systems outputs a large ASCII art version of the text that is supplied to it as its program arguments. One use of the command is to create highly visible separator pages for print jobs.

Why does Banner (Unix) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Banner (Unix)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Banner (Unix).

Tags

  • Unix text processing utilities

Keep exploring