From 6b3c499d918c81c0f1e1f53846922b8b61a91e46 Mon Sep 17 00:00:00 2001 From: fangshunjian Date: Thu, 3 Jan 2019 15:47:03 +0600 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=9C=A8=E9=A1=B5=E9=9D=A2=E9=85=8D=E7=BD=AE=20grep=20?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/nis/nmsclient/util/ProcessUtil.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/com/nis/nmsclient/util/ProcessUtil.java b/src/com/nis/nmsclient/util/ProcessUtil.java index 461a8d1..02deffc 100644 --- a/src/com/nis/nmsclient/util/ProcessUtil.java +++ b/src/com/nis/nmsclient/util/ProcessUtil.java @@ -1156,8 +1156,7 @@ public class ProcessUtil */ public static List getLinuxProcessId(String procSearchKey) { - String cmd = "ps -ef | grep -i '" + procSearchKey.trim() - + "' | grep -v grep | awk '{print $2}'"; + String cmd = "ps -ef | grep " + procSearchKey.trim() + " | grep -v grep | awk '{print $2}'"; logger.info("getLinuxProcessId-----" + cmd); String[] shellCmd1 = new String[] { "/bin/bash", "-c", cmd }; BufferedReader bReader = null; From aebc5f8718b4b99ceae0daf66e5f3446c67125de Mon Sep 17 00:00:00 2001 From: fangshunjian Date: Fri, 11 Jan 2019 10:48:44 +0600 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20ignore=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin/