How to make a python script “pipeable” in bash?

前端 未结 4 1664
轮回少年
轮回少年 2020-12-04 16:08

I wrote a script and I want it to be pipeable in bash. Something like:

echo \"1stArg\" | myscript.py

Is it possible? How?

4条回答
  •  离开以前
    2020-12-04 17:07

    Everything that reads from stdin is "pipeable". Pipe simply redirects stdout of former program to the latter.

提交回复
热议问题