title: Executing bash script from C++ and read its output ubuntu sdk
body: <p>I have a ubuntu application and I'm trying to execute bash scripts from it but it doesn't seem to be working. I tried doing this with system()</p>
  
  <pre><code>    #include &lt;stdio.h&gt;
      #include &lt;stdlib.h&gt;
      #include &lt;unistd.h&gt;
  
      int main(int argc, char *argv[])
      {
  // tried both
          system("./script.sh");
         // system ("script.sh")
  
      }
  </code></pre>
  
  <p>Also, i've tried researching this but did not find a solution; is it possible to also read the output and display in textbox.</p>