# Cursor position within the console in ruby

**URL:** <https://www.ruby-forum.com/t/cursor-position-within-the-console-in-ruby/144647>\
**Category:** Ruby\
**Created:** [July 31, 2008, 7:45pm UTC](https://www.ruby-forum.com/t/cursor-position-within-the-console-in-ruby/144647 "2008-07-31T19:45:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 31, 2008, 7:45pm UTC](https://www.ruby-forum.com/t/cursor-position-within-the-console-in-ruby/144647/1 "2008-07-31T19:45:29Z")

</div>

Hello… I’ve been working with ruby for some time, but this one has  
me stumped. Is there a nice way to position the cursor within the  
console? For instance, something simple: just move up one line  
relatively? In bash I would use something like:  
tput cuu1  
What about absolute positioning, like a having a countdown occur on a  
certain place on the screen?

Is this possible? I’m coming up with blanks on how to attempt  
this…? I’m sure this has been tackled before… Anyone want to  
point me in the right direction?  
thanks!

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 31, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/cursor-position-within-the-console-in-ruby/144647/2 "2008-07-31T19:51:22Z")

</div>

On Thu, Jul 31, 2008 at 1:44 PM, removed\_email\_address@domain.invalid  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is this possible? I’m coming up with blanks on how to attempt  
> this…? I’m sure this has been tackled before… Anyone want to  
> point me in the right direction?  
> thanks!

Curses in the standard library may work if you can afford the  
dependency.

[http://www.ruby-doc.org/stdlib/libdoc/curses/rdoc/index.html](http://www.ruby-doc.org/stdlib/libdoc/curses/rdoc/index.html)
