Cursor Laction in a shell script

Hey all;

I'm learning both Shell Scripting and Perl; I want to do the following in both:

I want to know how to move the cursor to a certain location on-screen so that when a user types something - it's on a specific line, about 20 characters in!

I'm using FreeBSD; BASH / pdKSH and Perl 5.6

Many thanks

if you are using vi editor, in esc mode (press ESC)...

if you want to place your cursor on 4 th line, 20 char

typing :1 will place your cursor on the first line, then type 3j to move to 4 th line, then type 20l

won't feel like doing it once you feel at home with vi...

Cheers!
Vishnu.

*rofl* I think he wants the script to do this. Something like:

#! /usr/bin/ksh
clear
tput cup 4 20
read data
echo data = $data
exit 0

With bash, it's easy:

go_to(){
echo -e "\\033[${1}G\c"
}

You can call it like "go_to 13", and it will leave your cursor on the 13th column... I use that function a lot of menuing scripts.
You can also but color tags and whatnot in there...

I've also had luck with that working in ksh93, btw.