How to make a text blink in shell script

前端 未结 4 1762
孤街浪徒
孤街浪徒 2021-02-02 10:57

I have this piece of code below:

echo \" \\033[33mTitle of the Program\\033[0m\"

which changes the colour to yellow.

How can I make the text

4条回答
  •  清酒与你
    2021-02-02 11:35

    A small work around to make the line blink in bash script

    for (( i=0;i<=3;i++))
    do
    #Below line will deleted the before printed line
    echo -en "\033[1A"
    echo -en "EmpNo:$empno already exists\n";
    sleep 0.4s;
    #Below line to print a blank line
    echo -en "\033[1A"
    echo -en "                                                            \n";                                                                         
    sleep 0.2s;
    done
    echo -en "\033[2A"
    echo -en "                                                            \n";
    echo -en "\033[1A"
    echo -en "Enter the empno       : "; read empno1;
    

提交回复
热议问题