On Tue, Oct 27, 2020 at 06:05:19PM +0800, Lin Jiaxin wrote:
+get_cpu arch 'Architecture' +get_cpu nr_node 'NUMA\snode(s)' +get_cpu nr_cpu '^CPU(s)' +get_cpu model_name 'Model\sname'
get_cpu will add more fields?
Only those fields required.
if so, you'd better use an array.
a=("arch 'Architecture'" "nr_node 'NUMA\snode(s)'" "nr_cpu '^CPU(s)'" "model_name 'Model\sname'")
for i in "${a[@]}" do get_cpu $i done
Good idea, I'll change it in next version.
Thanks, Zhangyu