Created
August 3, 2015 21:34
-
-
Save deepfriedmind/a6cdfa320c8cc842cb77 to your computer and use it in GitHub Desktop.
Output text strings in all 8 base colors + their light/bold variant (tested in bash on OS X)
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 | |
i=30 | |
for color in "black" "red" "green" "yellow" "blue" "purple" "cyan" "white" ; do | |
for attr in 0 1; do | |
if [[ $attr == 1 ]]; then | |
prefix="bold/light " | |
else | |
prefix="" | |
fi | |
echo -en "\033[${attr};${i}mThis is ${prefix}${color} text\033[0m\n" | |
done | |
echo # newline | |
((i++)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment