title: How do I extract the process ID from Valgrind's output using bash?
body: <p>I have a file with the output of a valgrind run. I need to print the number that valgrind shows every line (right after the "==").</p>
  
  <p>But I need to do it in only one line and without using the ";".</p>
  
  <p>I tried using the <code>head -1</code>, which gives me the first line and I know what I'm looking for is in it, then I was thinking about using <code>cut -d= -f3</code>, which I know, when using it on the file will give me what I want, but it outputs it several times and I want it once.</p>
  
  <p>How can I combine them. or is it not the way to do it?</p>
  
  <p>sample valgrind output: </p>
  
  <pre><code>==29192== Memcheck, a memory error detector.
  ==29192== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
  ==29192== Using LibVEX rev 1575, a library for dynamic binary translation.
  ==29192== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
  ==29192== Using valgrind-3.1.1, a dynamic binary instrumentati
  </code></pre>
  
  <p>and I want it to print only 29192 for the above example.</p>