【发布时间】:2013-03-29 05:34:06
【问题描述】:
这是我的问题。在 bash 3 中:
$ test='One "This is two" Three'
$ set -- $test
$ echo $2
"This
如何让 bash 理解引号并将 $2 返回为 This is two 而不是 "This?不幸的是,在此示例中,我无法更改名为 test 的变量的构造。
【问题讨论】:
-
这在mywiki.wooledge.org/BashFAQ/050中也有详尽的介绍
标签: string bash arguments spaces quoting