Hi,
I have many tomcat instances are running on Linux server and I would like to grep them based on a string called "catalina.base" here is one example
root 27180 1 0 Feb25 ? 00:02:10 /opt/java/jdk1.5.0_16//bin/java -Djava.util.logging.config.file=/opt/net/crowd-2.0.3/apache-tomcat/conf/logging.properties -Xms128m -Xmx256m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/net/crowd-2.0.3/apache-tomcat/endorsed -classpath :/opt/net/crowd-2.0.3/apache-tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/net/crowd-2.0.3/apache-tomcat -Dcatalina.home=/opt/net/crowd-2.0.3/apache-tomcat -Djava.io.tmpdir=/opt/net/crowd-2.0.3/apache-tomcat/temp org.apache.catalina.startup.Bootstrap start
So when i " ps -ef | grep java" --> will return all the instances of java and out of which I need only the string value "-Dcatalina.base="
to make it clear my search out put should be,
-Dcatalina.base=/opt/net/crowd-2.0.3/apache-tomcat
-Dcatalina.base=/opt/test/tomcat-2.0.3/apache-tomcat
-Dcatalina.base=/opt/test123/staging/apache-tomcat
-Dcatalina.base=/home/catalina/catalina-2.0/apache-tomcat
thanks