我有这个脚本,但我不知道如何获得打印输出中的最后一个元素:
cat /proc/cpuinfo | awk '/^processor/{print $3}'
最后一个元素应该是CPU的数量减去1.
linux bash cpu
bash ×1
cpu ×1
linux ×1