Trying to use grep and awk

[Closed]
Report
-
Posts
2
Registration date
Tuesday June 2, 2009
Status
Member
Last seen
June 23, 2009
-
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 reply

Posts
2
Registration date
Tuesday June 2, 2009
Status
Member
Last seen
June 23, 2009

awk '/Processor speed|Total main memory|Bus speed/' file