title: TCL: exec egrep "child process exited abnormally"
body: <p>I have a problem with egrep command.
  When I execute my command in tcsh it is working perfect but when I execute it from tcl script or in tclsh, I got: </p>
  
  <p><em><strong>child process exited abnormally</em></strong></p>
  
  <p>My tcl code:</p>
  
  <pre><code>exec egrep -i "^(\\\s+)?(tvf::)?LAYOUT\\\s+PATH" test_file
  </code></pre>
  
  <p>The test_file contain</p>
  
  <pre><code>LAYOUT PATH "file1"
    LAYOUT PATH "file2"
  //LAYOUT FILE "file 3"
  foo string
  tvf::LAYOUT PATH "file4"
    tvf::LAYOUT PATH "file5"
  </code></pre>
  
  <p>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</p>
  
  <p>Hello all,</p>
  
  <p>I did some additional investigations and run this command also on 32 bit machine.
  The command works properly with 32 bit egrep</p>
  
  <p>Result:</p>
  
  <pre><code>LAYOUT PATH "file1"
      LAYOUT PATH "file2"
  tvf::LAYOUT PATH "file3"
        tvf::LAYOUT PATH "file3"
  </code></pre>
  
  <p><em>file /bin/egrep</em>
  */bin/egrep: symbolic link to `grep'*</p>
  
  <p><em>file /bin/grep</em>
  */bin/grep: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped*</p>
  
  <p>But when I remove additional backslashes :</p>
  
  <pre><code>exec egrep -i "^(\s+)?(tvf::)?LAYOUT\s+PATH" test_file
  </code></pre>
  
  <p>The command return error:</p>
  
  <p><em><strong>child process exited abnormally</em></strong></p>
  
  <p>The egrep version on 64 bit machine is:</p>
  
  <p><em>file /bin/egrep</em>
  */bin/egrep: symbolic link to `grep'*</p>
  
  <p><em>file /bin/grep</em>
  */bin/grep: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped*</p>