【发布时间】:2011-05-15 13:34:35
【问题描述】:
你好
我想从 Groovy 程序执行 cat /path/to/file1 /path/to/file2 > /path/to/file3 之类的东西。 我试过 "cat /path/to/file1 /path/to/file2 > /path/to/file3".execute() 但这没有用。
经过一番搜索,我读到了 sh -c。所以我尝试了 "sh -c cat /path/to/file1 /path/to/file2 > /path/to/file3".execute(),但这也没用。
你有什么建议吗?
【问题讨论】: