h********g 发帖数: 116 | 1 rt.exec("rm foo"); 可以正确删除foo
但rt.exec("rm f*") ; 却没有作用
请问是什么原因?如何解决呢 |
c*****t 发帖数: 1879 | 2 f* is expanded by the unix shell. So you have to do something
like
rt.exec ("sh -c rm \"f*\"");
【在 h********g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : rt.exec("rm foo"); 可以正确删除foo : 但rt.exec("rm f*") ; 却没有作用 : 请问是什么原因?如何解决呢
|
h********g 发帖数: 116 | 3 does not working ~><~
而且 sh -c \" rm foo\" 都不行..
【在 c*****t 的大作中提到】![](/moin_static193/solenoid/img/up.png) : f* is expanded by the unix shell. So you have to do something : like : rt.exec ("sh -c rm \"f*\"");
|
g*****g 发帖数: 34805 | 4 Use the runtime to call a script, and put all your fancy
command in the script, it's often easier that way.
【在 h********g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : does not working ~><~ : 而且 sh -c \" rm foo\" 都不行..
|
h********g 发帖数: 116 | 5 thanks
【在 g*****g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Use the runtime to call a script, and put all your fancy : command in the script, it's often easier that way.
|