使用命令行参数

时间:2017-06-19 09:33:45

标签: bash shell

我有一个脚本通过特定位置的所有文件夹并停止每个文件夹上的服务。目前,此过程是顺序的,我想将其转换为并行执行。我试过用&最后在后台运行命令,但它不起作用。

#!/bin/bash
for dir in splunkforwarder_*/; do
  [[ -x "$dir"bin/splunk ]] || continue # skip if there is no splunk here
  "$dir"bin/splunk stop
done

有什么建议吗?谢谢!

0 个答案:

没有答案
相关问题