Print CPU temperature on macOS.
It works on x86_64 and arm64(M1 mac).
I took the code from hholtmann/smcFanControl/smc-command and modified it to specialize in temperature acquisition.
$ git clone https://github.com/narugit/smctemp
$ cd smctemp
$ sudo make install
$ smctemp -c
$ smctemp -h
Check Temperature by using Apple System Management Control (Smc) tool 0.1
Usage:
smctemp [options]
-c : list CPU temperatures (Celsius)
-h : help
-l : list all keys and values
-v : version
$ smctemp -c
64.2