What shell does os.system use in Python?
In Python, when I run a command with
os.system
what shell gets used?
Solution 1:
By default it will run in the Bourne shell (that would be /bin/sh
).
os.system("/bin/bash \"echo 'Rincewind rules' \" ")
to use bash
and have it echo "Rincewind rules".