# Blank lines in terminal

**URL:** <https://www.ruby-forum.com/t/blank-lines-in-terminal/179338>\
**Category:** Ruby\
**Created:** [November 22, 2009, 8:07pm UTC](https://www.ruby-forum.com/t/blank-lines-in-terminal/179338 "2009-11-22T20:07:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![revenantphoenix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@revenantphoenix](https://www.ruby-forum.com/u/revenantphoenix)\
**Post date:** [November 22, 2009, 8:07pm UTC](https://www.ruby-forum.com/t/blank-lines-in-terminal/179338/1 "2009-11-22T20:07:24Z")

</div>

I have an IRC bot I wrote, and I would like to have it so that in the  
console window, the bottom one or two lines are always blank.

In other words, I want puts/print to output to the second line from the  
bottom instead of the bottommost line.

I am aware that this could be done with curses/ncurses, but I have been  
unable to find any decent documentation for them in Ruby.

If possible I would like to avoid the need to use (n)curses.

---

<div class="post-metadata">

**Author:** ![revenantphoenix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@revenantphoenix](https://www.ruby-forum.com/u/revenantphoenix)\
**Post date:** [November 22, 2009, 9:08pm UTC](https://www.ruby-forum.com/t/blank-lines-in-terminal/179338/2 "2009-11-22T21:08:48Z")

</div>

On Mon, Nov 23, 2009 at 12:37 AM, Dylan Lukes  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have an IRC bot I wrote, and I would like to have it so that in the  
> console window, the bottom one or two lines are always blank.
> 
> In other words, I want puts/print to output to the second line from the  
> bottom instead of the bottommost line.
> 
> I am aware that this could be done with curses/ncurses, but I have been  
> unable to find any decent documentation for them in Ruby.
> 
> If possible I would like to avoid the need to use (n)curses.

May I ask why you want to avoid ncurses? It is, in general, a hard  
problem to do this sort of thing portably across platforms and  
terminals, and this is the exact problem curses is meant to solve.

martin

---

<div class="post-metadata">

**Author:** ![revenantphoenix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@revenantphoenix](https://www.ruby-forum.com/u/revenantphoenix)\
**Post date:** [November 23, 2009, 7:31am UTC](https://www.ruby-forum.com/t/blank-lines-in-terminal/179338/3 "2009-11-23T07:31:43Z")

</div>

Dylan Lukes wrote:

> I have an IRC bot I wrote, and I would like to have it so that in the  
> console window, the bottom one or two lines are always blank.
> 
> In other words, I want puts/print to output to the second line from the  
> bottom instead of the bottommost line.
> 
> I am aware that this could be done with curses/ncurses, but I have been  
> unable to find any decent documentation for them in Ruby.

60 seconds of Google searching, and behold:

> **[GitHub - eclubb/ncurses-ruby: A Ruby module for accessing the ncurses library](https://github.com/eclubb/ncurses-ruby)**
>
> A Ruby module for accessing the ncurses library. Contribute to eclubb/ncurses-ruby development by creating an account on GitHub.

A quick stop at rdoc.info, and:  
[http://rdoc.info/projects/eclubb/ncurses-ruby](http://rdoc.info/projects/eclubb/ncurses-ruby)

> If possible I would like to avoid the need to use (n)curses.

You probably won’t easily be able to.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
