eolas/neuron/9445c5fd-135c-4b0b-a70c-7a6fd45d9d58/Bash_colour_output.md
2025-04-05 10:32:40 +01:00

363 B

tags created
shell
Sunday, November 17, 2024

Bash colour output

Define colours:

RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NO_COLOR='\033[0m'

Interpolate in string:

echo -e "${BLUE}INFO Uploading graph file...${NO_COLOR}"

Note: must end with the blank colour otherwise everything subsequent will be in blue.