1832994 Members
2089 Online
110048 Solutions
New Discussion

Re: echo blinking text

 
S.C. Fun
Advisor

echo blinking text

Any idea how to echo blinking text on a terminal session? Thanks.
2 REPLIES 2
V Panchapakesan
Advisor

Re: echo blinking text

Hi,
The behaviour of a terminal largely depends on the emulation you use.
For VT100/VT220, the blink escape sequence is \E[5m (i.e. ^[[5m this is achieved in editor by ctrl+v ctrl+[ [ 5 m ) and text.
To stop blinking \E[0m ( ^[[0m).
You can know the characterestic of an emulation by untic command. This will give you the details of various escape sequence and the variables attributed. for e.g. blink=\E[5m. This can also be called from tput command like "tput blink" will make the text blink.
echo "${blink} your text"
Hope this is what you are asking for.

Panchu
I WANT TO BELIEVE
James R. Ferguson
Acclaimed Contributor

Re: echo blinking text

Hi:

Try this:

# echo "`tput blink`This blinks...`tput sgr0`...but not this"

See the man pages for 'tput' and particularly for 'terminfo'.

...JRF...