Create nice text banner in HPUX

Learn how to create text banners on the HPUX terminal. These banners can be used to show in the message of the day or user login screen so that the message is flashed to the user without getting ignored.

Have you ever wondered those ASCII text banner you see when you log in to the server, how people create them? Today we will see one of the methods to design ASCII banner made out of # symbols!

This process uses  HPUX native commands but there are other ways to do it in the Linux server as well. Check here how to create beautiful ASCII text banners in Linux.

In HPUX we have command banner native with OS. This command should be supplied with words. It will echo out supplied arguments typed in # marks which are 6 rows high. See below example :

$ banner kerneltalk

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

There is a limitation to this. Banner only takes the first 10 letters. It ignores all further characters. So basically it writes 10 characters using # symbol with 6-row height!

See below example where is counts only 10 characters to be shown.

$ banner 12345678910
   #     #####   #####  #       #######  #####  #######  #####   #####     #
  ##    #     # #     # #    #  #       #     # #    #  #     # #     #   ##
 # #          #       # #    #  #       #           #   #     # #     #  # #
   #     #####   #####  #    #  ######  ######     #     #####   ######    #
   #    #             # #######       # #     #   #     #     #       #    #
   #    #       #     #      #  #     # #     #   #     #     # #     #    #
 #####  #######  #####       #   #####   #####    #      #####   #####   #####

Minor design observations

When you use CAPS and SMALL letters, it shows all CAPS letters with 7-row height and SMALL with 6-row height.

$ banner TestingMe
#######                                                 #     #
   #     ######   ####    #####     #    #    #   ####  ##   ##  ######
   #     #       #          #       #    ##   #  #    # # # # #  #
   #     #####    ####      #       #    # #  #  #      #  #  #  #####
   #     #            #     #       #    #  # #  #  ### #     #  #
   #     #       #    #     #       #    #   ##  #    # #     #  #
   #     ######   ####      #       #    #    #   ####  #     #  ######

When you space in between, it will convert them to cartridge returns. So every character after space starts on a new line.

$ banner this is test

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


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


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

When you use only alphabets, there is always one blank row above output. If you use numbers, the output starts immediately on the next line of command. You can observe the above outputs.

These text banners can be used to show on user login session or in /etc/motd. They can flash important messages to user without getting ignored.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.