What command prints a string as "big ascii text art" in bash?

58,043

Solution 1

$ figlet you want figlet
                                         _      __ _       _      _   
 _   _  ___  _   _  __      ____ _ _ __ | |_   / _(_) __ _| | ___| |_ 
| | | |/ _ \| | | | \ \ /\ / / _` | '_ \| __| | |_| |/ _` | |/ _ \ __|
| |_| | (_) | |_| |  \ V  V / (_| | | | | |_  |  _| | (_| | |  __/ |_ 
 \__, |\___/ \__,_|   \_/\_/ \__,_|_| |_|\__| |_| |_|\__, |_|\___|\__|
 |___/                                               |___/            

Solution 2

There's also the old-school command "banner". It is crude but effective.

$ banner banner

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

A bit of googling showed me that rpmfind knows where to find it (although rpmfind appears to be having problems themselves these days...)

Solution 3

cowsay

$ cowsay cowsay makes banners
 ______________________
< cowsay makes banners >
 ----------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

$ cowsay -f tux cowsay is customisable
 ________________________
< cowsay is customisable >
 ------------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (|     | )
    /'\_   _/`\
    \___)=(___/

cowsay is amusingly '90s and provides a bunch of options for tweaking the cow's appearance. Read man cowsay.

It's still packaged for Ubuntu and Debian: sudo apt install cowsay

Solution 4

Toilet is even better. ;) I always used it as code banner for my applications

  ▞▀▖         ▐     ▜  ▙▗▌      ▗▐         
  ▌  ▙▀▖▌ ▌▞▀▘▜▀ ▝▀▖▐  ▌▘▌▞▀▖▛▀▖▄▜▀ ▞▀▖▙▀▖ 
  ▌ ▖▌  ▚▄▌▝▀▖▐ ▖▞▀▌▐  ▌ ▌▌ ▌▌ ▌▐▐ ▖▌ ▌▌   
  ▝▀ ▘  ▗▄▘▀▀  ▀ ▝▀▘ ▘ ▘ ▘▝▀ ▘ ▘▀▘▀ ▝▀ ▘   

There's a pretty good write-up of how to use it over on cyberciti.biz, titled: UNIX / Linux: Display Large Colourful Text Banner On Screen

Solution 5

Figlet can do that, and is in the Ubuntu Repos sudo apt-get install figlet:

"Using Figlet to Spice Up your Scripts" is a recent Linux Journal Article on the Topic.

Share:
58,043

Related videos on Youtube

raoulsson
Author by

raoulsson

CTO at Contovista AG Before: CEO at Zorp Technologies Inc., San Francisco, ...until Google Lens came out... Experienced software engineer and teamlead looking to build/enable useful, delightful, and meaningful products. Passionate, hard-worker interested in contributing to team-oriented, strong engineering cultures. Proven track record of hiring and running successful teams.

Updated on September 17, 2022

Comments

  • raoulsson
    raoulsson over 1 year

    I'm looking for a program that turns an ASCII string into something like the "ascii art" below:

        .-"^`\                                        /`^"-.
      .'   ___\                                      /___   `.
     /    /.---.                                    .---.\    \
    |    //     '-.  ___________________________ .-'     \\    |
    |   ;|         \/--------------------------//         |;   |
    \   ||       |\_)          Red Hat         (_/|       ||   /
     \  | \  . \ ;  |     Enterprise Linux     || ; / .  / |  /
      '\_\ \\ \ \ \ |                          ||/ / / // /_/'
            \\ \ \ \|    Server Release 5.3    |/ / / //
             `'-\_\_\     Codename Tikanga     /_/_/-'`
                    '--------------------------'
    

    I don't have a matching example but I would like the string be turned into some multi line text, like:

     __    __
    /  |  /  |
    |  |  |  |
    |  |--|  |
    |  |--|  |
    |  |  |  | 
    |_/   |_/
    

    for the letter H and so on... I would like to use this to show certain warning messages, for example when the user is about to run a script that will delete the production database and so on...

    Thanks!

  • Kyle Brandt
    Kyle Brandt over 14 years
    Too sloooow :-)
  • chris
    chris over 14 years
    Maybe just too small?
  • Spence
    Spence over 14 years
    +1 - Oh, how I love figlet. Proportional fonts SUCK...
  • davey
    davey over 14 years
    There's a web front end for figlet at: bigtext.org
  • Des Horsley
    Des Horsley over 6 years
    bigtext.org seems to be no more
  • Brad Parks
    Brad Parks almost 6 years
    this works on osx using homebrew too! brew install figlet
  • nathanfranke
    nathanfranke over 3 years
    If you would like the man page to be read by a cow, check man cowsay | cowsay
  • artbn
    artbn about 3 years
    i purposely logged in just to upvote this!!!!!