cut and uniq turned out to be quite handy and can be used along with sedcat /proc/cpuinfo | grep "model name" | uniq | cut -d: -f2So, instead of this
model name : Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz
model name : Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHzI get this
Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHzOK, another approach is to use
awkcat /proc/cpuinfo | grep "model name" | uniq | awk -F: '{print($2)}'
No comments:
Post a Comment