1 2 3 4 5 6 7 8 9
#!/bin/bash if [ "$1" == "err" ]; then color="\[$(tput setaf 1)\]" # red else color="\[$(tput setaf 10)\]" fi RESET="\[$(tput sgr0)\]" echo "${color}\w${RESET} ❱ "