terminal command to show ...

Is there a simple command to print the number of processors and the graphic card type in the terminal? Any ideas?

Quad 2.5GHz PowerPC G5, Mac OS X (10.4.5)

Posted on Feb 25, 2006 11:37 PM

Reply
8 replies

Feb 26, 2006 9:59 PM in response to Wataru Kagawa

Number of CPUs:
echo ${${${(f)"$( system_profiler SPHardwareDataType
)"}[6]}# Number Of CPUs: }


There should be six spaces between the sharp sign and 'Number'.

Graphic Card Type:
echo ${${${${(f)"$( system_profiler
SPDisplaysDataType )"}[2]}%:}# }


Similarly, there should be four spaces between the sharp sign and the last parenthesis.

For some reason, in the process of copying and pasting these commands from Safari to the terminal, I lose those spaces.

Feb 27, 2006 3:00 AM in response to Bill Scott

Thanks.
Since I do not know HTML language well, I just typed every thing in Mozilla Composer, and pasted the HTML source here.

Number of CPUs:
echo ${${${(f)"$( system_profiler SPHardwareDataType )"}[6]}# Number Of CPUs: }

Graphic Card Type:
echo ${${${${(f)"$( system_profiler SPDisplaysDataType )"}[2]}%:}# }

I think I will do this from now on, especially when I need to show terminal commands, links, etc.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

terminal command to show ...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.