我正在使用Cygwin的tcsh外壳。我安装了Cygwin是因为我有一个教授在Linux / Mac中给出了很多指令,并且它们都使用csh命令。
当我键入此内容时:
cat some_file.txt | some_python_script.py
我明白了:
some_python_script.py: Command not found.
其中some_python_script.py是应在stdin上运行的脚本。如果我在linux / mac环境中,如何使自己的Python脚本在Cygwin中工作?
谢谢!
您正在要求将some_file.txt
的内容通过管道传输到some_python_script.py
它期待在那里的命令。通常,您将运行像这样的python脚本
python some_python_script.py
如果您想将some_file.txt
的内容传送到其中,请执行此操作>>
cat some_file.txt | python some_python_script.py