Skip to content

Instantly share code, notes, and snippets.

@hirose31
Created December 19, 2013 07:41
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 hirose31/8035723 to your computer and use it in GitHub Desktop.
Save hirose31/8035723 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Display ANSI colours.
#
esc="\033["
echo -e "\t 40\t 41\t 42\t 43\t 44 45\t46\t 47"
for fore in 30 31 32 33 34 35 36 37; do
line1="$fore "
line2=" "
for back in 40 41 42 43 44 45 46 47; do
line1="${line1}${esc}${back};${fore}m Normal ${esc}0m"
line2="${line2}${esc}${back};${fore};1m Bold ${esc}0m"
done
echo -e "$line1\n$line2"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment