Use bash instead of sh as the shell of choice for python command namespace functions -


i need use commandline suited bash style, e.g.

diff x  <(cat y | tail +2) 

however, sh -c of above line gives error, hence commands.getoutput of above line fails. however, bash -c of above want done. can suggest how make python use bash. understand can done using subprocess, have lot of command lines have process , want use commands.getoutput.

thanks.

you can commands.getoutput("bash -c 'diff x <(tail +2 y)'"), perhaps (note cat unnecessary).

however: commands.getoutput('tail +2 y | diff x -') doesn't require bash.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -