masonwan
10/12/2013 - 7:00 PM

Print all possible combinations of bash colors, according to [Advanced Bash-Scripting Guide](http://www.tldp.org/LDP/abs/html/colorizing.htm

Print all possible combinations of bash colors, according to Advanced Bash-Scripting Guide

#! /bin/bash

for isBold in {0..1}; do
  for background in {40..47}; do
    for foreground in {30..37}; do
      colorTag='\e['$isBold';'$foreground';'$background'm'
      colorResetTag='\e[0m'
      text=$colorTag'isBold:'$isBold' foreground:'$foreground' background:'$background$colorResetTag
      echo -e $text
    done
    echo '================'
  done
done