【发布时间】:2011-09-26 14:54:05
【问题描述】:
有谁知道是否有办法在 shell 中自动运行命令列表(来自文本文件)?
我需要运行很多脚本(大约 1000 个)。这些脚本在 python 中,每个都有 2 个参数(dir_# 和 sample#)
我制作的文本文件是这样的……
python /home/name/scripts/get_info.py dir_1 sample1
python /home/name/scripts/get_info.py dir_2 sample2
python /home/name/scripts/get_info.py dir_3 sample3
python /home/name/scripts/get_info.py dir_4 sample4
...
所以,我希望将此文本文件作为参数传递给终端中的命令,可以自动完成这项工作......
提前致谢,
佩克斯
【问题讨论】:
-
您要查找的命令是
source。
标签: linux list command-line terminal