You are not logged in.
I haven't tried it, but how about
sed -i 's|\(env python$\|/bin/python$\)|&2|'?
This didn't work, but this has worked fine:
sed -i 's/\(bin\/env\ python$\|bin\/python$\)/bin\/env\ python2/g'And the full command with find:
find . -name "*.py" -exec sed -i 's/\(bin\/env\ python$\|bin\/python$\)/bin\/env\ python2/g' {} \;Last edited by korn36 (2014-01-25 21:37:14)
Offline
hmm, probably better to just look at the project and see which shebangs it uses.
Offline