# Script question

**URL:** <https://community.unix.com/t/script-question/260860>\
**Category:** Shell Programming and Scripting\
**Created:** [March 2, 2010, 12:13pm UTC](https://community.unix.com/t/script-question/260860 "2010-03-02T12:13:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hakermania](https://community.unix.com/user_avatar/community.unix.com/hakermania/32/5803_2.png) [@hakermania](https://community.unix.com/u/hakermania)\
**Post date:** [March 2, 2010, 12:13pm UTC](https://community.unix.com/t/script-question/260860/1 "2010-03-02T12:13:56Z")

</div>

I know some tricks like this :

```nohighlight
echo " E"; sleep 0.1; clear;  
echo " Er"; sleep 0.1; clear;  
echo " Err"; sleep 0.1; clear; 
echo " Erro"; sleep 0.1; clear; 
echo " Error "; sleep 0.1; clear;
 echo " Error P"; sleep 0.1; clear; 
echo " Error Pl"; sleep 0.1; clear; 
echo " Error Ple"; sleep 0.1; clear; 
echo " Error Plea"; sleep 0.1; clear; 
echo " Error Pleas"; sleep 0.1; clear; 
echo " Error Please "; sleep 0.1; clear; 
echo " Error Please T"; sleep 0.1; clear; 
echo " Error Please Tr"; sleep 0.1; clear; 
echo " Error Please Try "; sleep 0.1; clear;
 echo " Error Please Try A"; sleep 0.1; clear; 
echo " Error Please Try Ag"; sleep 0.1; clear;
 echo " Error Please Try Aga"; sleep 0.1; clear;
 echo " Error Please Try Agai"; sleep 0.1; clear
;echo " Error Please Try Again"; sleep 0.1; clear;
echo " Error Please Try Again."; sleep 0.1; clear; 
echo " Error Please Try Again.."; sleep 0.1; clear; 
echo " Error Please Try Again..."; sleep 1; clear;

```

In order to do something a bit more surprising I done this, but I have a big question. Some programs like airodump -ng use to display the characters and change some variables between them and then show them to us without to really change something, I mean to clear the screen or something like that. As you see in the screenshot, airodump-ng changes the number of data and th number of packets and other things and nothing else is moving.I mean neither the screen is cleaned nor there is a command like sleep.How is this possible to be done with the help of a script? ![](http://img155.imageshack.us/img155/5822/screenshot2go.png)

---

<div class="post-metadata">

**Author:** ![RTM](https://community.unix.com/user_avatar/community.unix.com/rtm/32/58_2.png) [@RTM](https://community.unix.com/u/RTM)\
**Post date:** [March 2, 2010, 1:48pm UTC](https://community.unix.com/t/script-question/260860/2 "2010-03-02T13:48:54Z")

</div>

You can use escape characters with VT100 emulation -

# Next line: in vi, use control V first to add an escape sequence and  
# then control [ for \<ESC\> (^[=\<ESC\>)  
echo -n "[19;1H $counter"  
# DCL: "\<ESC\>[19;1H" UNIX: "^[[19;1H"  
# Moves cursor to line 19 position 1 on screen

```nohighlight
#!/bin/csh -f
clear
echo "^[[15;1H Here I am"
sleep 3
echo -n "^[[10;15H Now I am here."
sleep 3
echo -n "^[[20;20H Hey, down here."
sleep 3
echo ""
exit

```

Note that the ^[ is made in vi editor with Control-V and then Control-[

---

<div class="post-metadata">

**Author:** ![anon57720281](https://community.unix.com/letter_avatar/anon57720281/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon57720281](https://community.unix.com/u/anon57720281)\
**Post date:** [March 2, 2010, 4:07pm UTC](https://community.unix.com/t/script-question/260860/3 "2010-03-02T16:07:06Z")

</div>

[Ansi Escape Sequences](http://isthe.com/chongo/tech/comp/ansi_escapes.html)
