【问题标题】:GNU parallel redirect unique files as inputGNU 并行重定向唯一文件作为输入
【发布时间】:2018-02-22 14:51:57
【问题描述】:

我有一个程序需要输入作为使用“

parallel myprogram < input_{}.txt ::: {1..10}

input_1.txt、input_2.txt 等直到 input_10.txt 都在当前目录中,其中包含我需要传递给 myprogram 的唯一参数。这里我遇到了一个错误:

-bash: input_{}.txt: No such file or directory

感谢您的帮助。

【问题讨论】:

    标签: bash io-redirection gnu-parallel


    【解决方案1】:

    我快到了。只需在 "

    parallel myprogram "< input_{}.txt" ::: {1..10}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-25
      • 1970-01-01
      • 1970-01-01
      • 2021-04-29
      • 2013-09-08
      • 2018-05-01
      • 2015-07-06
      • 1970-01-01
      相关资源
      最近更新 更多