Try this: 
    
    
    import threadpool, osproc
    
    let a = spawn execProcess("ls -la .")
    let b = spawn execProcess("echo $HOME")
    let c = spawn execProcess("./my_other_script")
    
    # wait for all the threads to finish
    sync()
    
    # the carrot gets the value out of the FlowVar
    echo ^a
    echo ^b
    echo ^c
    
    
    Run

execCmdEx currently doesn't work with spawn... possibly a bug. :-)

But for basic use, this should do what you want. 

Reply via email to