Talk:Banner (Unix)

From Wikipedia, the free encyclopedia

Exclamation point and quotes don't seem to work together.

$ banner Hello!
#     #                                   ###
#     #  ######  #       #        ####    ###
#     #  #       #       #       #    #   ###
#######  #####   #       #       #    #    #
#     #  #       #       #       #    #
#     #  #       #       #       #    #   ###
#     #  ######  ######  ######   ####    ###

but,

$ banner "Hello!"
bash: !": event not found

I'm using bash 3.00 on a Solaris machine. Here is the man page:

$ man banner
User Commands                                           banner(1)

NAME
     banner - make posters

SYNOPSIS
     banner strings

DESCRIPTION
     banner prints its arguments (each up to 10 characters  long)
     in large letters on the standard output.

ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWesu                     |
    |_____________________________|_____________________________|

SEE ALSO
     echo(1), attributes(5)

SunOS 5.10          Last change: 14 Sep 1992                    1

Anyone know why this doesn't work? Thanks Hyad 22:46, 31 October 2006 (UTC)

The ! is a reserved symbol in bash, and probably a lot of other shells. use \! and it should work fine. You would have the same problem if you wanted to print with banner --> hello" because of the closing quote symbol. --128.175.226.30 03:08, 4 December 2006 (UTC)

The horizontal banner mode isn't just for terminals. (The article currently says "which prints text horizontally for display to a terminal".) It is useful for large type printing on linemode printers, and I've seen it used to print job owner (ie user) on coversheets of printouts. --Elijah (talk) 01:44, 4 March 2008 (UTC)