Occasionally it is necessary to print out a text file. There are a couple of ways of making this happen in a slightly prettier fashion than simply using lp file.txt.

a2ps is one possibility - it gives you nice borders & prints by default 2 x A5 pages sideways on A4 (landscape). There are a vast array of options. However, none of them give you double-spacing, which if you’re printing in order to edit, is a nuisance.

pr, on the other hand, doesn’t do the pretty thing, but does do double-spacing. And you can pipe its output elsewhere.

So we get:

pr -d -t | a2ps
which will send output to your default printer. (Use the -o switch to a2ps to get a postscript file instead if you want to check layout first.) The -d switch does double-spacing, the -t switch suppresses the filename and page header, which you don’t want because a2ps will provide them.

Obviously if you want real proper nice printing then I commend to you the splendid LaTeX, but if you need plain text then putting in then stripping out all that markup is a PITA.