Changing cursor position using shell script

Hi,

Pleae help me on this. Normally, when we say read username, the cursor will come in the first position of next line, but I want the output of the below

Normal usage
-------------

please enter username:
_ [cursor should blink in this position.]

I want like the below
----------------------

please enter username:

[space_space_space_space_] _ [cursor should blink in this position.]

I tried \t also, but not working

Please use tput commands for this:

tput cup row_num col_num

Or you could try this if you don't know exactly what row your cursor may end up on while running the script.

printf "Please Enter User Name:\n\t\t\t"
read username

Or, for output on the same line.

printf "Please Enter User Name: "
read username