2

Basically what I want to do is make a file called doPython and in this file I want to do the command:

python myFile.py data.txt

I've tried Googling and making a few scripts but I can't seem to get it to work. It says "No such file or directory when I try with

#!/usr/bin/env python
python myFile.py data.txt

1 Answer 1

9

#!/usr/bin/env python says that your script is to be run with the Python interpreter. You just need to call sh or bash:

#!/bin/sh
python myFile.py data.txt
Sign up to request clarification or add additional context in comments.

1 Comment

Ok, I changed it and then typed: chmod -x doPython but when I type doPython now I get "permission denied".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.