<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    Use: <br>
    <br>
     "/bin/bash"  "-c" acmd arg @stdout=o<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 06/26/2014 01:53 PM, Ketan
      Maheshwari wrote:<br>
    </div>
    <blockquote
cite="mid:CAMUuvirmvbXCMmL6t+jkHG9E8yTPQcj-3Xbzc4wZrNko73+1dg@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>The following T script with app def fails for me:</div>
        <div><br>
        </div>
        <div>
          <div>import files;</div>
          <div>import io;</div>
          <div>import string;</div>
          <div><br>
          </div>
          <div>app (file o) cmd (string acmd, string arg) {</div>
          <div>  "/bin/bash -c" acmd arg @stdout=o</div>
          <div>}</div>
          <div><br>
          </div>
          <div>main {</div>
          <div>file output<sprintf("s.txt")> = cmd("echo",
            "hello");</div>
          <div>}</div>
        </div>
        <div>
          <br>
        </div>
        <div><br>
        </div>
        <div>
          <div>CAUGHT ERROR:</div>
          <div>external command failed: /bin/bash -c echo hello</div>
          <div>    while executing</div>
          <div>"error $msg"</div>
        </div>
        <div>
          <div>    (procedure "turbine_error" line 6)</div>
          <div>    invoked from within</div>
          <div>"turbine_error "external command failed: $cmd $args""</div>
          <div>    (procedure "turbine::exec_external" line 16)</div>
          <div>    invoked from within</div>
          <div>"turbine::exec_external "/bin/bash -c" [ dict create
            "stdout" ${v:__filename:o} ] ${v:acmd} ${v:arg}"</div>
          <div>    (procedure "cmd-app-leaf0" line 17)</div>
          <div>    invoked from within</div>
          <div>"cmd-app-leaf0 0 {7.0} 1 {1} {4} {file 7 is_mapped 1}"</div>
          <div>Turbine worker task error in: cmd-app-leaf0 0 {7.0} 1 {1}
            {4} {file 7 is_mapped 1}</div>
          <div>    invoked from within</div>
          <div>"c::worker_loop $WORK_TYPE(WORK)"</div>
          <div>    (procedure "worker" line 28)</div>
          <div>    invoked from within</div>
          <div>"worker $rules $startup_cmd"</div>
          <div>    (procedure "enter_mode_unchecked" line 5)</div>
          <div>    invoked from within</div>
          <div>"enter_mode_unchecked $rules $startup_cmd"</div>
          <div>    (procedure "enter_mode" line 10)</div>
          <div>    invoked from within</div>
          <div>"enter_mode $rules $startup_cmd "</div>
          <div>CALLING adlb::abort</div>
          <div>ADLB_Abort(1)</div>
          <div>MPI_Abort(1)</div>
          <div>application called MPI_Abort(MPI_COMM_WORLD, 1) - process
            1</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>I want to run an arbitrary command with arbitrary args via
          /bin/bash or /bin/sh.</div>
        <div><br>
        </div>
        <div>Any suggestions?</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Ketan</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
ExM-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ExM-user@lists.mcs.anl.gov">ExM-user@lists.mcs.anl.gov</a>
<a class="moz-txt-link-freetext" href="https://lists.mcs.anl.gov/mailman/listinfo/exm-user">https://lists.mcs.anl.gov/mailman/listinfo/exm-user</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Justin M Wozniak
</pre>
  </body>
</html>