#!/bin/bash
diff file1 file2
if [[ $ = 0 ]];then
echo "not modified"
else
diff file1 file2
fi
因为有shell pipe。看这个例子: String[] cmd = {"/bin/sh","-c","ls /etc | grep release"};Process p = RuntimegetRuntime()exec(cmd);
以上就是关于linux shell 根据 diff 输出全部的内容,包括:linux shell 根据 diff 输出、linux下怎么调用命令并获取输出结果和返回值、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)