我egrep的运行使用Java的Runtime.exec()egrep的失败而在壳成功
String command = "egrep \'(Success|Loading\\.\\.\\.|Loaded : READY|Found a running instance)\' "+ instance.getPath() + "/log";
Runtime.getRuntime().exec(command);
的标准输出始终是零和标准错误显示“egrep的:无与伦比(或(”但是当我复制命令shell并运行,它返回正确的值
需要mo es逃跑! –