gpt4 book ai didi

python - 在Linux上批量运行python脚本?

转载 作者:太空宇宙 更新时间:2023-11-04 06:06:15 24 4
gpt4 key购买 nike

请告诉我是否有一种方法可以在 Linux 上批量运行多个 python 脚本,就像在 Windows 上使用 .bat 文件批量运行多个 python 脚本一样?谢谢。

最佳答案

创建脚本...

#!/bin/sh
# This file is called ~/script.sh

python script1.py
python script2.py

使脚本可执行...

chmod +x ~/script.sh

运行脚本...

~/script.sh

关于python - 在Linux上批量运行python脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11297980/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com