<?xml version="1.0" encoding="windows-1252"?>
<node id="575125" title="Re: Resetting your Terminal for each line printed" created="2006-09-27 07:02:54" updated="2006-09-27 03:02:54">
<type id="11">
note</type>
<author id="465654">
liverpole</author>
<data>
<field name="doctext">
Hi [ghenry],
&lt;p&gt;From your question:
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt;&lt;c&gt;(by adding print ' ' x 80;)&lt;/c&gt;&lt;/i&gt;
&lt;p&gt;it looks like you mean you wish to clear to the end of the line, is that correct?
&lt;p&gt;If so, use &lt;i&gt;&amp;lt;escape&amp;gt;[K&lt;/i&gt; like so:
&lt;c&gt;
print "\e[K";
&lt;/c&gt;
&lt;p&gt;Some of the escape sequences I use all the time are:
&lt;c&gt;
print  "\e[H";              # Put the cursor on the first line
print  "\e[J";              # Clear from cursor to end of screen
print  "\e[H\e[J";          # Clear entire screen (just a combination of the above)
print  "\e[K";              # Clear to end of current line (as stated previously)
print  "\e[m";              # Turn off character attributes (eg. colors)
printf "\e[%dm", $N;        # Set color to $N (for values of 30-37, or 100-107)
printf "\e[%d;%dH", $R, $C; # Put cursor at row $R, column $C (good for "drawing")
&lt;/c&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-465654"&gt;
&lt;hr /&gt;
&lt;font size="1"&gt;
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
&lt;/font&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
575100</field>
<field name="parent_node">
575100</field>
</data>
</node>
