Skip to content

Instantly share code, notes, and snippets.

@roktas
Created April 15, 2014 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roktas/10757990 to your computer and use it in GitHub Desktop.
Save roktas/10757990 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Bash, Zsh, Ksh compatible
dotunderscore_logo() {
local dotfront=$'\e[36;01m'
local dotback=$'\e[1;30m'
local underscorefront=$'\e[33;01m'
local underscoreback=$'\e[1;30m'
local reset=$'\e[0m'
sed -e 's/[ \t]//g' \
-e 's/\\/\\\\/g' \
-e "s/D/$dotfront/g" \
-e "s/d/$dotback/g" \
-e "s/U/$underscorefront/g" \
-e "s/u/$underscoreback/g" \
-e 's/[.]/ /g' <<-'DOTUNDERSCORE'
D..____
./\d../D\
/d_D.\___\
\../.../
.\/__d\D/U..______________
......../\............u/U\
......./u_U.\_____________\
.......\../............./
........\/____________u\U/
DOTUNDERSCORE
echo -en "$reset"
}
show_dotunderscore_logo() {
local lead=$1
if [[ -n $lead ]]; then
echo -e "$(dotunderscore_logo)" | sed -e "s/^/$lead/g"
else
echo -e "$(dotunderscore_logo)"
fi
}
for i in {1..5}; do
lead="\t$lead"
show_dotunderscore_logo "$lead"
sleep 0.2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment