在Linux上批量运行python脚本? [英] Run python scripts in a batch on Linux?

查看:612
本文介绍了在Linux上批量运行python脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Please let me know if there is a way I can run multiple python scripts in a batch on Linux, like the way it is possible to run multiple python scripts in a batch using a .bat file on windows? Thanks.

推荐答案

创建脚本...

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

python script1.py
python script2.py

使脚本可执行...

chmod +x ~/script.sh

运行脚本...

~/script.sh

这篇关于在Linux上批量运行python脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆