代码之家  ›  专栏  ›  技术社区  ›  thinkingmonster

在groovy中嵌入双引号字符串[duplicate]

  •  0
  • thinkingmonster  · 技术社区  · 7 年前

    如何在groovy中为字符串的execute方法提供包含空格的参数?仅仅像在shell中那样添加空格是没有帮助的:

    println 'ls "/tmp/folder with spaces"'.execute().text
    

    这将为ls调用提供三个断开的参数。

    0 回复  |  直到 17 年前