for f in 'model name' processor 'physical id' 'cpu cores' siblings;do grep "$f" /proc/cpuinfo|tail -n 1;done|sed 's,.*: ,,'|{ read M;read P;let P=P+1;read I;[ -z "$I" ] && I=0;let I=I+1;read C;[ -z "$C" ] && C=1;read S;[ -z "$S" ] && S=1;echo $M: $I CPUs with $C cores and $S siblings $([ $S -gt $C ] && echo " (hyperthreading)") '("'$P virtual processors'")'; }