I currently have this code:
cat /proc/cpuinfo | grep "MHz" | cut -d ':' -f2 | sed 's/.*/Core NUM&Mhz/'
Which outputs the following (for 8 cores):
Core NUM 1941.054Mhz Core NUM 1949.820Mhz Core NUM 2022.734Mhz Core NUM 1877.171Mhz Core NUM 1938.265Mhz Core NUM 1945.703Mhz Core NUM 1845.562Mhz Core NUM 1781.546Mhz
What I want to do is replace "Core NUM" with actual numbers (e.g. Core 0, Core 1, Core 2, Core 3...) I would prefer a solution that can be done on one line with the rest of this command, but since I am in the end working from a bash script, I don't mind a multi-line/scripted solution either. The biggest problem I guess is that grep is one command outputting many lines, and I don't know if there's a way to target these lines one by one in something like a for or while loop.
So, how can I do this?