awk 'BEGIN{FS="[:\t]";OFS="\t";print "核\t主频\t缓存\t线程数\t核号\t物理核数\tMIPS\t刷新缓存"}{a[$1]=$NF;if($1 == "power management"){print a["processor"],strtonum(a["cpu MHz"])/1000"GHz",strtonum(a["cache size"])/1024"M",a["siblings"],a["core id"],a["cpu cores"],a["bogomips"],a["clflush size"]}}' /proc/cpuinfo | column -t
结果: