Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess
- cmd1=subprocess.Popen(["su","-","splunk"],shell=True,stdout=subprocess.PIPE)
- cmd2=subprocess.Popen(["./path/myBashFile.sh"],shell=True,stdin=cmd1.stdout,stdout=subprocess.PIPE)
- cmd2.stdout
Add Comment
Please, Sign In to add comment