The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 970β€…    Votes:  1β€…    βœ… Solution
Tags: bash   java   hardware   cpu  
Link: πŸ” See Original Answer on Ask Ubuntu πŸ”—

Title: How to get Processor ID from any linux command
ID: /2019/11/21/How-to-get-Processor-ID-from-any-linux-command
Created: November 21, 2019    Edited:  June 12, 2020
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false

From comments:

sudo dmidecode -t processor | grep -E ID |  sed 's/.*: //'

The sed command is used to remove the line prefix: β€œ ID: β€œ as explained in this popular answer:


First part pipes string to sed.

The second is a basic sed substitution. The part between the first and
second / is the regex to search for and the part between the second
and third is what to replace it with (nothing in this case as we are

For the regex, . matches any character, * repeats this any number of
times (including zero) and : matches a colon. So effectively it is
anything followed by a colon. Since .* can include a colon, the match
is β€˜greedy’ and everything up to the last colon is included.

⇧ Is there a markdown "rich text" editor? Using syslog to diagnose a crash  β‡©