title: run script inside ksh shell script
body: <p>I am trying to execute a script ksh that reads a file and execute other script to access the MySQL database. But the second script doesn't return any result. Does anyone know why? please.</p>
  
  <pre><code>#!/bin/ksh
  
  vet=($(cat lasts_tasks.txt))
  echo ${vet[@]}
  
  for workunit in ${vet[@]};
  do
          echo "workunit:$workunit"
          exe="/var/www/boinc/m52cc/query_tasks.sh m52cc -workunitResult $workunit;"
          echo ""$exe
          result=`$exe`
          echo $result
  done
  </code></pre>
  
  <p>The results are:</p>
  
  <pre><code># ./lerArquivo.sh 
  m52cc_job_5 m52cc_job_6 m52cc_job_7
  workunit:m52cc_job_5
  /var/www/boinc/m52cc/query_tasks.sh m52cc -workunitResult m52cc_job_5;
  
  workunit:m52cc_job_6
  /var/www/boinc/m52cc/query_tasks.sh m52cc -workunitResult m52cc_job_6;
  
  workunit:m52cc_job_7
  /var/www/boinc/m52cc/query_tasks.sh m52cc -workunitResult m52cc_job_7;
  </code></pre>
  
  <p>But when I execute the lines alone, I have the right result:</p>
  
  <pre><code># /var/www/boinc/m52cc/query_tasks.sh m52cc -workunitResult m52cc_job_7;
  105
  </code></pre>