I need to determine if my terminal outputs colored output or not using bash scripts. Is there any direct shell command for this? How can i do this?
My main goal is to determine if the result matches the terminal color by default or not. If it does not match, I must write a warning message in a text file.
source
share