我写了一个bash脚本,它需要运行130个Perl脚本。
#!/bin/bash perl file1.pl & perl file2.pl & perl file3.pl & .... .... perl file130.pl &
上面的bash脚本在cron中configuration为每10分钟运行一次。 有没有其他方法可以同时运行所有这些超过130个Perl脚本?
for script in file*.pl do perl "$script" & done
如果脚本实际上是这样命名的:
#!/bin/bash for i in {1..130} do perl "file$i.pl" & done