Last active
November 12, 2018 21:06
-
-
Save flackend/ead6edeefa80d712b007 to your computer and use it in GitHub Desktop.
echo colors cheatsheet
This file contains hidden or 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/sh -e | |
for attr in $(seq 0 1); do | |
for fg in $(seq 30 37); do | |
for bg in $(seq 40 47); do | |
printf "\033[$attr;${bg};${fg}m$attr;$fg;$bg\033[m " | |
done | |
echo | |
done | |
done |
COLOR="\033[;35m"
COLOR_RST="\033[0m"
echo -e "${COLOR}My special log message${COLOR_RST}"
Normal or bold text:
bold=$(tput bold)
normal=$(tput sgr0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From: http://softwarelivre.org/terceiro/blog/a-visual-cheat-sheet-for-ansi-color-codes