Answers for "how to change colors in terminal linux outputs"

0

how to change colors in terminal linux outputs

#!/bin/sh
MOVE_UP=`tput cuu 1`
CLEAR_LINE=`tput el 1`
BOLD=`tput bold`
UNDERLINE=`tput smul`
RESET=`tput sgr0`
echo "This is normal text"
sleep 1
echo "${MOVE_UP}${CLEAR_LINE}${BOLD}This is bolded"
sleep 1
echo "${MOVE_UP}${CLEAR_LINE}${UNDERLINE}This is underlined${RESET}"
Posted by: Guest on June-01-2021
0

how to change colors in terminal linux outputs

#!/bin/sh
RED_FG=`tput setaf 1`
GREEN_BG=`tput setab 2`
RESET=`tput sgr0`
echo "${RED_FG}${GREEN_BG}Hello world${RESET}"
Posted by: Guest on June-01-2021
0

how to change colors in terminal linux outputs

#!/bin/sh
RED_ON_GREEN='\033[31;42m'
RESET='\033[0m'
echo "${RED_ON_GREEN}Hello world${RESET}"
Posted by: Guest on June-01-2021

Code answers related to "how to change colors in terminal linux outputs"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language