[英]How to make a blinking printf command (using tput) stop manually after a while in bash (Ubuntu 18.04)?
我知道我可以使用以下命令来闪烁 prinf 或 echo 命令,但是如何在一段时间后或进程完成后停止它? 我正在编写一个脚本,闪烁表示正在执行一个进程,一旦它停止,用户就知道该步骤已完成。
BLINK=$(tput blink)
NORMAL=$(tput sgr0)
printf "${BLINK}${GREEN} ------- installing something ------- \n\n${NORMAL}"
我用...
printf "Normal \e[5m\e[31mBlink\e[0m\n"
...并从: https://misc.flogisoft.com/bash/tip_colors_and_formatting
所以我认为你需要\e[0m
以正常 output 结束。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.