title: Using awk to get a specific string in line
body: <p>I have a java process containing multiple strings in the <code>ps</code> output. I just want a particular string out of it.</p>
  
  <p>For example, I have </p>
  
  <pre><code>root 5565 7687  0 Nov20 ?  00:00:54 /bin/java -Xms256m -Xmx512m -XX:MaxPermSize=128m  -XX:PermSize=256m -XX:MaxPermSize=256m -Dstdout.file=/tmp/std.out -da -Dext.dir.class=profiles/ -Dprocess.name=java1 -Djava.security.policy=security.policy
  </code></pre>
  
  <p>I want just want <code>process.name=java1</code> and require nothing else from the <code>ps</code> output. I was unable to find a tangible way to do so using awk or sed. </p>
  
  <p>I am tried to use:</p>
  
  <pre><code>ps -ef | grep java1 | grep -v grep | awk '/process.name/ {print $0}'
  </code></pre>
  
  <p>The output I get is the <code>ps -ef</code> out.</p>
  
  <p>Is there a simpler way?</p>