This script shows how you can print out various things in color from BASH script.
#!/bin/bash
NORMAL=$(tput sgr0)
GREEN=$(tput setaf 2; tput bold)
YELLOW=$(tput setaf 3)
RED=$(tput setaf 1)
function error() {
echo -e "$RED$*$NORMAL"
}
function warn() {
echo -e "$YELLOW$*$NORMAL"
}
function debug() {
if [[ $DEBUG ]]
then
echo -e "$GREEN>>>$*$NORMAL"
fi
}
error "danger!"
warn "caution"
echo "normal"
DEBUG=true
debug "debug me"
find . -type f -exec md5 '{}' ';' | sort -k 4| uniq -f 3 -d | sed -e "s/.*(\(.*\)).*/\1/" | sort