📌  相关文章
📜  如何更改终端 linux 输出中的颜色 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:08.896000             🧑  作者: Mango

代码示例3
#!/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}"