I can't open a bash shell in CentOS with python 2.7, I'm able to do so in python 2.6.6 Debian. What has changed?
I tried a simple bash process substitution:
from subprocess import Popen
cmd="""cat <<'EOF'
this is
test $unchanged
EOF
"""
Popen('cat <(%s)' % cmd, shell=True, executable='/bin/bash')
In Debian this works, in CentOS it doesn't:
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `cat <(cat <<'EOF''
The differences are:
- Debian: Python 2.6.6,
/bin/sh
is provided by dash. - CenOS (Red Hat): Python 2.7,
/bin/sh
is provided by bash
So in CentOS the executable=/bin/bash
is not being honored at all.
Am I missing something?