run=: 4 : 0 'p o i'=. 2!:2 x NB. Run command, save Process, Output, Input y fwrite i NB. Write to its input fclose i NB. Close its input 2!:3 p NB. Wait for process to terminate z=.fread o NB. Read its output fclose o NB. Close its output z NB. Result )