<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jpcamargo &#187; response</title>
	<atom:link href="http://jpcamargo.com/tag/response/feed/" rel="self" type="application/rss+xml" />
	<link>http://jpcamargo.com</link>
	<description>ruby &#039;mind.rand&#039; &#124; awk &#039;{ print $1 }&#039;</description>
	<lastBuildDate>Mon, 10 May 2010 17:41:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>ruby: print in the same line</title>
		<link>http://jpcamargo.com/2009/10/26/ruby-print-in-the-same-line/</link>
		<comments>http://jpcamargo.com/2009/10/26/ruby-print-in-the-same-line/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 22:34:00 +0000</pubDate>
		<dc:creator>jp</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[inline]]></category>
		<category><![CDATA[response]]></category>

		<guid isPermaLink="false">http:///2009/10/26/ruby-print-in-the-same-line</guid>
		<description><![CDATA[I’ve always tried to make my scripts’ responses prettier and less crowded, and I came across something like the following piece of code, that helped me a lot lately #!/usr/bin/env ruby STDOUT.sync = true bars = ['/','-','\\','&#124;'] i=1 while i do print "\rrunning #{bars[i%4]}" i += 1 sleep 1 end trap("INT") { print "\n\n" exit [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve always tried to make my scripts’ responses prettier and less crowded, and I came across something like the following piece of code, that helped me a lot lately</p>
<p><code>
<pre class="brush: ruby">#!/usr/bin/env ruby
STDOUT.sync = true
bars = ['/','-','\\','|']
i=1
while i do
  print "\rrunning #{bars[i%4]}"
  i += 1
  sleep 1
end
trap("INT") {
  print "\n\n"
  exit
}
</pre>
<p></code><br />
If you like to see updates without flooding your terminal screen, this is one of the best ways to do it.</p>
]]></content:encoded>
			<wfw:commentRss>http://jpcamargo.com/2009/10/26/ruby-print-in-the-same-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
