But the actual problem here is to get the cursor position dynamically. The cursor pos is variable and this prog need to get the printing position before printing to that location. Other parts like clearing we can use our own logic. Like ..
====================
for e in asd niroj sinu rajesh ava o
do
l=` expr length $e `
tput cup 30 40#This is varible. I need to get the cursor pos dynamically
while [ $l -ge 0 ] //to clear at position i am overwriting with space double the prev word length
do
print " \c"
l=` expr $l - 1 `
done
tput cup 30 40#This is varible. I need to get the cursor pos dynamically
for num in 1 10 3 145
do
tput sc //Save the current cursor position
echo "$num\c"
tput rc //Recover the saved cursor position
sleep 1
tput el //Clears the current line
tput rc
done