# Write to console at same locations

**URL:** <https://rubytalk.org/t/write-to-console-at-same-locations/65056>\
**Category:** ruby-talk\
**Created:** [16 March 2012 17:49 UTC](https://rubytalk.org/t/write-to-console-at-same-locations/65056 "2012-03-16T17:49:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_E](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@Jan\_E](https://rubytalk.org/u/Jan_E)\
**Post date:** [16 March 2012 17:49 UTC](https://rubytalk.org/t/write-to-console-at-same-locations/65056/1 "2012-03-16T17:49:21Z")

</div>

Hi,

Apart from clearing the whole screen with system 'cls' (Windows) or  
system 'clear' (Linux), there's no simple way that works on all  
platforms.

On Linux, you can use the ANSI escape sequences (I think). On Windows,  
you can use the Win32 functions. Or you could use a library like  
ncurses.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
