使用{} - >的bash one-liner中的多个命令"意外的文件结束"

时间:2017-07-08 03:04:58

标签: bash

我试图运行以下内容:

bash -c "[[ -d foo ]] || { mkdir foo && echo create foo done }"

但我得到以下错误:

bash: -c: line 1: syntax error: unexpected end of file

为什么我会出现上述错误?我该如何解决?

0 个答案:

没有答案