2023-04-05 18:50:56 +03:00
|
|
|
source colors.sh
|
|
|
|
|
|
|
|
# with colors.sh sourced, you can use the constants
|
|
|
|
echo "${RED}This is red text${NC} and this is ${GREEN}green ${BLINK}blink${NC} text${NC}"
|
|
|
|
echo "this is ${MAGENTA}magenta ${BLINK}blink${NC} text${NC}"
|
|
|
|
|
|
|
|
# or you can use the functions
|
|
|
|
echo $(gray "[INFO] " && green "This is gree test")
|
2023-04-05 19:06:09 +03:00
|
|
|
|
|
|
|
# there can be a function that uses the colors
|
|
|
|
function info() { echo $(gray "[INFO] " && yellow "$@"); }
|
|
|
|
info "This is a info test"
|