shell cursor operations

Hi

I need to save the actual cursor position into variable in my script.
How can I do it ?

thx for help.

For tty's (not gui's) use the ANSI escape codes: <ESC>[6n

See: ANSI/VT100 Terminal Control