在python中调用了bash,并通过&>或者>将输入记录到log中时的顺序问题 示例代码 play1.py: import os print("hello world") os.system("./twt.sh") twt.sh: #!/bin/bash echo " contentone" echo " contenttwo" 运行命令:python3 ./play1.py > log1.log log1.log内容: contentone co 日志 admin 2024-09-05 165 热度 0评论