# Telnet - waitfor examples

**URL:** <https://www.ruby-forum.com/t/telnet-waitfor-examples/170390>\
**Category:** Ruby\
**Created:** [June 16, 2009, 11:38pm UTC](https://www.ruby-forum.com/t/telnet-waitfor-examples/170390 "2009-06-16T23:38:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nwiger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/dbc845/32.png) [@nwiger](https://www.ruby-forum.com/u/nwiger)\
**Post date:** [June 16, 2009, 11:38pm UTC](https://www.ruby-forum.com/t/telnet-waitfor-examples/170390/1 "2009-06-16T23:38:52Z")

</div>

Hi guys,

Could you please send me a few examples of how to use the waitfor  
function once you establish a telnet connection?  
My problem is that, I’m telnetting to a device, I’m changing the  
hostname, and then I’m rebooting it. When it comes back up, I want to  
use waitfor to verify that the hostname was succesfully changed.

Thanks,  
nate
