<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>