Skip to content

Instantly share code, notes, and snippets.

@justinmklam
Created March 21, 2019 23:17
Show Gist options
  • Save justinmklam/72f2b74d6613e4e01705447223c62a2c to your computer and use it in GitHub Desktop.
Save justinmklam/72f2b74d6613e4e01705447223c62a2c to your computer and use it in GitHub Desktop.
Simple demo for adding terminal colours to a bash script.
#!/usr/bin/env bash
# Colours for terminal colours
RED=`tput setaf 1`
GREEN=`tput setaf 2`
YELLOW=`tput setaf 3`
PINK=`tput setaf 5`
CYAN=`tput setaf 6`
RESET=`tput sgr0`
echo "${RED}New colour${RESET}"
echo "${GREEN}New colour${RESET}"
echo "${YELLOW}New colour${RESET}"
echo "${PINK}New colour${RESET}"
echo "${CYAN}New colour${RESET}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment