我想从bash标准输入中执行类似python的脚本代码,因为我不想先将脚本编写到文件。怎么办?
如果我想从bash标准输入运行python代码,比如:
#!/usr/bin/env python
print 'hello world'
$cat myode.py | bash-s猫
但没用。错误显示:
Warning: unknown mime-type for "hello world" -- using "application/octet-stream"
错误:没有这样的文件“hello world”
Tags:
目前没有回答
相关问题 更多 >
编程相关推荐