On Sun, 2010-07-18 at 21:55 +0200, Denys Vlasenko wrote:
> On Saturday 17 July 2010 19:12, Christopher Barry wrote:
> > All,
> > 
> > looking for an easy way to capture the current cursor position. found a
> > reference to 'ESC [ 6 n', but not sure how that works. I tried
> > # echo -e '\e[6n'
> > but that does not do what I expect.
> 
> It makes terminal talk:
> 
> shadow:~# echo -ne '\e[6n'; hexdump -vC
> ^[[6;1R (here I press ^D^D to let hexdump see EOF) 00000000  1b 5b 36 3b 31 
> 52                                 |.[6;1R|
> 00000006
> 

Denys, I have no idea what the heck that means! :)

I was actually looking for something to put in a script, kinda like:

cp=$(get_cursor_position)
[[ ${cp} -gt 0 ]] && echo

so my logger would not be writing at the end of an unrelated line.


Regards,
-C

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to