-1

I'm trying to run python on a curl output without actually downloading the file onto the system.

So instead of doing the following:

wget 1.2.3.4/mypythonfile.py
python mypythonfile.py

I'd like to be able to do something like python | (curl 1.2.3.4/mypythonfile.py).

The above command doesn't work by the way.

How would I do that?

2
  • curl 1.2.3.4/mypythonfile.py | python Commented Apr 18, 2018 at 2:15
  • 1
    Possible duplicate of curl and run python script Commented Apr 18, 2018 at 2:21

1 Answer 1

3

Instead of python | (curl 1.2.3.4/mypythonfile.py), do this

curl 1.2.3.4/mypythonfile.py | python -
Sign up to request clarification or add additional context in comments.

2 Comments

The first solution create a copy of the file on the system. OP ask to avoid that. I think the 2nd one answer that.
The first option should be removed. Totally redundant.

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.