HPUX 11.0.X / Korn Shell
Hope this makes sense.
I have a little function to place things on the screen using the column and row parameters. Question is, how can I be sure of where the current cursor postion is so that if I print something to the upper right hand corner of the screen, I can again return back to the row (really the next row) where the cursor was originally?
Example: Assume that my current cursor position is at row 52. I call my function to print a message starting at row 20, column 35. How can I return focus back to row 52 (or 53) after I have printed to the screen? Is there a way to grab my current row/column attributes?
xy \(\) \{
\#_R= row, _C=column
_R=$1
_C=$2
tput cup $_R $_C
}