【问题标题】:How to use GNU parallel with ::: in the middle of the command如何在命令中间使用 GNU parallel with :::
【发布时间】:2022-12-07 05:22:58
【问题描述】:

我想使用 GNU parallel 为多个系统运行一个命令。

该命令将是:

nimadm -c <system> -l lppsource73 -s spot73 -o bosinst_migration -j nimadm_vg -d hdisk0 -Y

因为我有一个变量中的系统列表。 我尝试并行执行以下操作:

parallel nimadm -c ::: $HOSTS -l lppsource73 -s spot73 -o bosinst_migration_73 -j nimadm_vg -d hdisk0 -Y

不幸的是它不工作......并行启动“:::”之后的所有工作

你能帮我吗? 提前致谢...

此致, 约尔格

【问题讨论】:

    标签: unix parallel-processing


    【解决方案1】:
    parallel nimadm -c {} -l lppsource73 -s spot73 -o bosinst_migration -j nimadm_vg -d hdisk0 -Y ::: $HOSTS
    

    这包括在:

    如果您想深入了解:花几个小时浏览教程 (man parallel_tutorial)。您的命令行会因此爱上您。

    在 man parallel_examples 中也可以找到很多使用示例。

    【讨论】: