Introduction
Using colors in terminal output makes messages easier to see and understand quickly.
echo -e "\e[COLOR_CODEmYour text here\e[0m"echo -e "\e[31mThis is red text\e[0m"echo -e "\e[32mThis is green text\e[0m"echo -e "\e[1;34mThis is bold blue text\e[0m"#!/bin/bash # Print messages in different colors echo -e "\e[31mError: Something went wrong!\e[0m" echo -e "\e[32mSuccess: Operation completed!\e[0m" echo -e "\e[33mWarning: Check your input.\e[0m" echo -e "\e[1;34mInfo: Process started.\e[0m"
\e[31m do in a bash script?Success in green color using echo in bash?echo -e "\e[33mWarning\e[0m: Disk space low"
Error in red:echo "\e[31mError\e[0m"
Success in green and Error in red on separate lines, then resets color. Which script snippet correctly does this?Pass the test and this pattern moves unknown