Skip to content

Instantly share code, notes, and snippets.

@carlessanagustin
Created February 23, 2022 11:00
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 carlessanagustin/4c679280037b38aec5a0f9681880e19f to your computer and use it in GitHub Desktop.
Save carlessanagustin/4c679280037b38aec5a0f9681880e19f to your computer and use it in GitHub Desktop.
logging and colors
#!/usr/bin/env bash
RED=$'\e[0;31m'
R=${RED}
BLUE=$'\e[0;34m'
B=${BLUE}
GREEN=$'\e[0;32m'
G=${GREEN}
CYAN=$'\e[0;36m'
C=${CYAN}
YELLOW=$'\e[0;33m'
Y=${YELLOW}
RESET=$'\e[0m'
RC=${RESET}
announce(){
echo "${Y}[ $(date -u '+%Y-%m-%dT%H:%M') ] xXx - ${1}${RC}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment