我有这个奇怪的问题,我不明白为什么会发生。对于任何 bash 忍者来说,这应该是小菜一碟。
OPTIONS="-auto -batch -ignore 'Path one' -ignore 'Path two' -ignore 'Path three'"
unison $OPTIONS a b
我希望这会被翻译为...
unison -auto -batch -ignore 'Path one' -ignore 'Path two' -ignore 'Path three' a b
...然后工作。但事实并非如此。运行完整命令时,我没有问题,一致就可以了。但是当我运行命令时unison $OPTIONS a b
,齐声抱怨:
Usage: unison [options]
or unison root1 root2 [options]
or unison profilename [options]
For a list of options, type "unison -help".
For a tutorial on basic usage, type "unison -doc tutorial".
For other documentation, type "unison -doc topics".
unison was invoked incorrectly (too many roots)
我究竟做错了什么?