Trying to use grep and awk

Closed
villiage1.jmh - Jun 1, 2009 at 05:35 PM
ghostdog74 Posts 2 Registration date Tuesday June 2, 2009 Status Member Last seen June 23, 2009 - Jun 3, 2009 at 11:15 PM
Hello,
I'm new to linux. I have the current output in a file:
server_2 :
threads runnable = 6
threads blocked = 1731
threads I/J/Z = 3
memory free(kB) = 3313982
cpu idle_% = 98
server_2 :
Processor = Intel Pentium 4
Processor speed (MHz) = 3100
Total main memory (MB) = 4024
Mother board = Barracuda XP
Bus speed (MHz) = 533
Bios Version = 3.56
Post Version = Rev. 02.36

What I would like the output to show in another file is like this:
server_2 :
Processor speed (MHz) = 3100
Total main memory (MB) = 4024
Bus speed (MHz) = 533
memory free(kB) = 3314736
cpu idle_% = 98


How can i use grep and awk to accomplish this.. please help...

Thanks

1 response

ghostdog74 Posts 2 Registration date Tuesday June 2, 2009 Status Member Last seen June 23, 2009
Jun 3, 2009 at 11:15 PM
awk '/Processor speed|Total main memory|Bus speed/' file

0