I type the sysctl -n hw.model command to retrieve the following information about my processor:
I want to extract the information (above) into three separate parts (using three separate sysctl -n hw.model commands).
Example:
How would I use the sysctl(8) command to pull the word "Intel"?
How would I use the sysctl(8) command to pull the word "i7" and the value "870"?
How would I use the sysctl(8) command to pull the value "2.93GHz"?
PS: Color codes are only used to display the information I want to pull together.
Code:
Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz
I want to extract the information (above) into three separate parts (using three separate sysctl -n hw.model commands).
Example:
Code:
Manufacturer: Intel
Processor Number: i7 870
Clock Speed: 2.93GHz
How would I use the sysctl(8) command to pull the word "Intel"?
How would I use the sysctl(8) command to pull the word "i7" and the value "870"?
How would I use the sysctl(8) command to pull the value "2.93GHz"?
PS: Color codes are only used to display the information I want to pull together.