首页 > 代码库 > shell脚本 通过路径查找tomcat的PID和路径

shell脚本 通过路径查找tomcat的PID和路径

#!/bin/bash

if [ ! -n "$1" ];then

        echo -e "Usage: $0 PATH"

        exit 30

fi


#T_P=$(ps aux |grep "$1" | grep -v -E "grep|tomcat_path"|awk ‘{print $2 ,$(NF-3)}‘|sed ‘s/-Dcatalina.home=/   --        /g‘)

echo "-PID-------------------PATH----"

ps aux |grep "$1" | grep -v -E "grep|tomcat_path"|awk ‘{print $2 ,$(NF-3)}‘|sed ‘s/-Dcatalina.home=/   --       /g‘


本文出自 “startuppp” 博客,请务必保留此出处http://startuppp.blog.51cto.com/11847460/1872606

shell脚本 通过路径查找tomcat的PID和路径