title: Sed substitution - spaces by tabs
body: <p>I'm trying to formatting a batch of .c files via the <code>sed</code> command in a shell script to align properly the functions name. I'm replacing <code>int(space)function1()</code> by <code>int(3tab)function1()</code></p>
  <pre><code>int         function1(int foo)
  {
      *my_function_code*
  }
  
  char        function2(int foo)
  {
      *my_function_code*
  }
  
  int         main(int foo)
  {
      *my_function_code*
  }
  </code></pre>
  <p>I'm actually using the following loop to apply my substitution :</p>
  <pre><code>#align global scope
  printf &quot; Correct global scope alignement...\n&quot;
  for file in ${FILES[@]}; do
  sed -i -e 's/^int */int         /g' \
      -i -e 's/^char */char       /g' \
      -i -e 's/^float */float     /g' \
      -i -e 's/^long int */long int   /g' ${file}
  done
  </code></pre>
  <p>The problem is, if I rerun the script, instead of doing nothing, it will add multiple tabs again. Giving me this :</p>
  <pre><code>int                     function1(int foo)
  {
      *my_function_code*
  }
  
  char                    function2(int foo)
  {
      *my_function_code*
  }
  
  int                     main(int foo)
  {
      *my_function_code*
  }
  </code></pre>
  <p>The <code> *</code> isn't supposed to looking only for spaces and not tabulations or is it considered as all blanks characters ?</p>