OSA: System info shell program

while(true)
do
echo "CPU INFORMATION
      1.CPU CORES AND THREADS
      2.CPU MANUFACTURER
      3.PROCESSOR FAMILY
      4.PROCESSOR VERSION
      5.PROCESSOR FREQUENCY
      6.SYSTEM MANUFACTURER
      7.BIOS VERSION
      8.RAM INFO 
      9.EXIT"
read a;
case $a in
1)echo "CPU INFORMATION.."
dmidecode -t processor
;;
2)echo "CPU MANUFACTURER.."
dmidecode -s processor-manufacturer   
;;
3)echo "PROCESSOR FAMILY.."
dmidecode -s processor-family
;;
4)echo "PROCESSOR VERSION.."
dmidecode -s processor-version   
;;
5)echo "PROCESSOR FREQUENCY.."
dmidecode -s  processor-frequency   
;;
6)echo "SYSTEM MANUFACTURER.."
dmidecode -s  system-manufacturer
;;
7)echo "BIOS VERSION.."
dmidecode -s bios-version

;;
8)echo "RAM INFO.."
dmidecode -t memory
;;
9)echo "stopped...."
  exit 0
;;
esac;
done




how to execute:
1.copy code and paste in gedit
2.save it with filename.sh extension
3.open terminal
4.type   sh filename.sh

Comments

Popular posts from this blog

NASM: program to find largest number from an array of 32-bit numbers(hard-coded)

Rules for drawing a FLOWCHART