title: sed command - branching to label
body: <p>I am not able to get the same output as the example given in the SED tutorial for branching below,
  <a href="http://www.grymoire.com/Unix/Sed.html#uh-59" rel="nofollow">http://www.grymoire.com/Unix/Sed.html#uh-59</a></p>
  
  <p>Quoting the code here:</p>
  
  <pre><code>#!/bin/sh
  sed '
  :again
      s/([ ^I]*)//
      t again
  '
  </code></pre>
  
  <p>The spaces are still in the brackets after this filter.</p>
  
  <p>[UPDATE]
  Here is my output:</p>
  
  <pre><code>$echo "( ( test ) )" | sed '
  &gt; :again
  &gt;      s/([ ]*)//
  &gt;      t again
  &gt; '
  ( ( test ) )
  $
  </code></pre>
  
  <p>Shouldn't that be <code>((test))</code>?
  How do I get the script to delete the blank spaces in the nested parenthesis as demonstrated by the author?</p>
  
  <p>[/UPDATE]</p>
  
  <p>[UPDATE2]</p>
  
  <pre><code>$echo " ( ( ) ) " | sed '
  &gt; :again
  &gt; s/\([ ]*\)//
  &gt; t again
  &gt; '
  </code></pre>
  
  <p>Prompt is not back.</p>
  
  <p>[/UPDATE2]</p>
  
  <p>Also how do I enter the "^I" character? I think it is the horizontal tab, but I am not able to key in like other control characters via puTTY(for eg, to get "Enter", I type "Ctrl-V" followed by the "Enter" key, but this isn't working for tab). I tried with spaces only(using regex <code>[ ]*</code> instead of <code>[ ^I]*</code>), but this also failed to work.</p>