Filed under: Terminal Tips
Terminal Tip: Create a text banner
Want to create a "Happy Birthday" or "Congratulations" banner? Want to skip all the "how do I get a large font to print sideways?" stuff? The command line "banner" command may help. It allows you to create a sideways message that you can open in TextEdit, print out and (with a bit of help from scissors and scotch tape) hang from the rafters. The banner command defaults to an old style text width of 132 characters, so you'll want to tell it to keep that width down to 72 or 75 if you're going to use TextEdit's default font. (You can always play with the font sizes in TextEdit and the width in the banner command if you want.) Use the -w flag to set the width and put the text you want to bannerize in a string. The bit about "open -f" pipes the results into TextEdit.
banner -w 72 "Happy 75th Birthday" | open -f

Reader Comments (Page 1 of 1)
Kevin Little said 7:14PM on 5-18-2007
One of my Co-Workers has a birthday this Monday. I'm going to give this a whirl. Thanks.
http://www.ebizmba.com
Reply
Mike Eggleston said 7:51PM on 5-18-2007
If you are going to use Exclamation Points (!) or other special characters, use *SINGLE QUOTES ONLY* ('), otherwise the banner tries to interpret the exclamation points as something (I am not sure as to what though).
Reply
Dan Bolling said 8:22PM on 5-18-2007
Ok, I'm a Unix geek, but doesn't this seem like a blatant case of using Terminal just for the sake of using Terminal?
This command is not available on all Unixes (Unices?), and I read somewhere that "banner" is likely to be withdrawn from the X/Open standards. Regardless, a script that uses banner might not be portable to other platforms.
Reply
Calexico said 9:02PM on 5-18-2007
Dan Bolling, here's a terminal command just for you:
banner -w 72 "Party Pooper" | open -f
Reply
Michael Rose said 9:15PM on 5-18-2007
Calexico, LOL!
Reply
ifjake said 9:47PM on 5-18-2007
ha. the manual page for it says "Banner prints a large, high quality banner on the standard output." ha. high quality. that's great.
Reply
Dave said 11:43PM on 5-18-2007
And in other news, computer users were transported back to the '80s earlier this evening...
Reply
Nitin said 6:45AM on 5-19-2007
I am doing a study on influential bloggers on various blog sites. I have a preliminary model to study the blogging history of each blogger on a blog site and generate a list of influential bloggers. I used TUAW blog site as my experimental dataset due to its enthusiastic activity, focussed discussions and not to mention the overlap with my interests.
I am facing it hard to validate the results of the model. I think the best way to evaluate could be to ask the users (bloggers, comment-ers or readers) of TUAW blog site and have their feedback since no one would know better than the actual users at TUAW. It would be great if you could provide me top 5 members of this month whom you think might have influenced you by their blog post. I will then match these human suggested influential bloggers with those proposed by the model to analyze the accuracy.
If anyone is interested in discussing more about it then we can either discuss here or take it offline through exchange of emails. I could be reached at nagarwa6@asu.edu.
Reply
Mr. E said 10:10AM on 5-19-2007
Can Terminal print images as well?
High quality printout indeed! Many years ago in Hong Kong, my parents had baby pictures of me and my sister printed using characters from a dot matrix printer. It was such a novelty then, I'm sure they cost something outrageous.
Reply
WilkZ said 5:37PM on 5-19-2007
(to Mr. E)
Yup, for sure. Just replace 'open -f' option with 'lpr':
banner -w 72 "Happy 75th Birthday" | lpr
Reply
WilkZ said 6:32PM on 5-19-2007
(to Mr. E, once again)
Uh, sorry, didn't notice "image" in your question. Well, in fact you cannot generate ASCII art from image files with standard command line tools; on the other hand, there's a bunch of ASCII art converters with command line interface you'd try to compile and install on OS X. Finally, there're some samples of GUI ASCII art related software designed for Macs like free JavE 5.0 and ASCIIsee v1.0.1 shareware utility. Just try MacUpdate.com and stuff .
Reply
Allister said 6:56PM on 5-19-2007
Dave got it right. Now, where did I leave that continuous lineflow??
Reply
Micah Cooper said 4:43PM on 5-20-2007
If this type of thing floats your boat, you should really give figlet (http://www.figlet.org/) a try. Multiple ascii fonts.
You wouldn't want to have your old VM/CMS login without it!
Reply