Shell Script To Find CPU Model


Shell Script to find CPU model

# vim cpumodel.sh

#!/bin/sh

if [ -f /proc/cpuinfo ]; then

    echo -n "MODELNAME=\""
    grep -m 1 "model name" /proc/cpuinfo | cut -d: -f2 | sed -e 's/^ *//' | sed -e 's/$/"/'

fi

To Run

# chmod +x cpumodel.sh
# ./cpumode.sh




Shell Script To Find CPU Model Shell Script To Find CPU Model Reviewed by vivek sathisan on 15:56 Rating: 5

No comments:

© Copyright to vivek sathisan. Powered by Blogger.