Last active
December 25, 2015 09:19
-
-
Save masonwan/6953606 to your computer and use it in GitHub Desktop.
Print all possible combinations of bash colors, according to [Advanced Bash-Scripting Guide](http://www.tldp.org/LDP/abs/html/colorizing.html)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment