如何在 gnu-parallel 中逃避大括号

How to escape brace in gnu-parallel

我有一个 python 脚本,我想用这种方式使用 gnu-parallel 调用它:

parallel run_script.py --outfile=/path/to/somewhere/{}/{}.nc --shift={} ::: 1 2 3

如何转义 [--outfile] 中的第一个大括号以用于 python 字符串格式化?

预期结果:

parallel --dry-run run_script.py --outfile=/path/to/somewhere/{}/{}.nc --shift={} ::: 1 2 3
run_script.py --outfile=/path/to/somewhere/{}/{}.nc --shift=1
run_script.py --outfile=/path/to/somewhere/{}/{}.nc --shift=2
run_script.py --outfile=/path/to/somewhere/{}/{}.nc --shift=3

使用 -I 将 {} 更改为其他内容:

parallel -I ,, --dry-run run_script.py --outfile=/path/to/somewhere/{}/{}.nc --shift=,, ::: 1 2 3