40

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!

6 Answers 6

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

5
  • +1 - Oh, how I love figlet. Proportional fonts SUCK... Dec 11, 2009 at 15:00
  • 3
    There's a web front end for figlet at: bigtext.org
    – gm3dmo
    Dec 21, 2009 at 20:27
  • 1
    bigtext.org seems to be no more Feb 7, 2018 at 3:31
  • 2
    this works on osx using homebrew too! brew install figlet
    – Brad Parks
    Jul 30, 2018 at 16:52
  • i purposely logged in just to upvote this!!!!!
    – Peter Teoh
    Mar 14, 2021 at 6:21
17

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...)

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.

2
  • Too sloooow :-) Dec 11, 2009 at 14:40
  • 3
    Maybe just too small?
    – chris
    Dec 11, 2009 at 14:44
5

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

5

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

1
  • If you would like the man page to be read by a cow, check man cowsay | cowsay Sep 16, 2020 at 10:40
3

It is likely that your first example was created using boxes.

Not the answer you're looking for? Browse other questions tagged .