I was trying to write a bash script. This is the code I've managed to write.
#!/bin/bash
RED='\033[0;31m'
NC='\033[0m' # No Color
CurrentBranch=$(git rev-parse --abbrev-ref HEAD)
printf("${RED}$CurrentBranch${NC}")
I am storing the current branch value in a variable and trying to print it in red colour, but I'm getting the following error.
printf "${RED}$CurrentBranch${NC}"