Skip to main content

Bash - ASCII art

Learn how to add eye-catching ASCII art banners to your Bash scripts for a bigger visual impact. Includes a full sample code implementation.

· One min read
View raw
Christophe
Markdown, WSL and Docker lover ~ Insatiable curious.
Cet article existe aussi en français — lire la version française.

This article is over a year old but was reviewed on July 30, 2026 — the content is still accurate.

Bash - ASCII art

⚡
TL;DR

This short article shows how to add an ASCII-art banner to Bash scripts for a bit of visual flair, generated with the free patorjk.com/software/taag tool and echoed at the top of the script.

I write a lot of Bash scripts, and I like to have a similar approach for each one: a banner, a logging function, doc blocks above each function. One of the things I always do is to include a good old-fashioned ASCII Art banner, perhaps for the geek factor, but mostly to make a bigger visual impact.

I use https://patorjk.com/software/taag to create my banners, so let's take a closer look. The same idea, applied to a website instead of a console: Inject ASCII Art in any HTML pages rendered by Docusaurus.

Sample ASCII art

For my part, I'm implementing the banner like this:

#!/usr/bin/env bash
set -euo pipefail
function __main() {
clear
# http://patorjk.com/software/taag/#p=display&f=Big&t=My%20Nice%20Script
cat <<\EOF
__ __ _ _ _ _____ _ _
| \/ | | \ | (_) / ____| (_) | |
| \ / |_ _ | \| |_ ___ ___ | (___ ___ _ __ _ _ __ | |_
| |\/| | | | | | . ` | |/ __/ _ \ \___ \ / __| '__| | '_ \| __|
| | | | |_| | | |\ | | (_| __/ ____) | (__| | | | |_) | |_
|_| |_|\__, | |_| \_|_|\___\___| |_____/ \___|_| |_| .__/ \__|
__/ | | |
|___/ |_|
EOF
printf "%s\n\n" "(c) Copyright ..."
# Program the functions of your script here,
# such as calling your functions
return 0
}
__main "$@"

This is a bash script template that sets up error handling, displays an ASCII art banner when run, and provides a structured entry point for adding your actual script logic. The script exits on any error or undefined variable to prevent bugs from going unnoticed.

And this is how it'll look in my bash terminal:

Terminal


Was this article helpful?
Did you try the steps in this article?