DIGIT-ARC read-only archive · snapshot: July 23, 2026

HELP shell scripting!!

4 posts · originally from https://geek.digit.in/community/threads/help-shell-scripting.13950/

mediator
mediator Original post #1
Aug 12, 2005 at 1:36 AM
I want to develop a shell script which dispalys system information like CPU speed,RAm,processor type etc.
So far i have been able to knowonly one variable -> $HOSTNAME
If anybody know more shell variables like thisplease post here or post complete shell script!
GNUrag
GNUrag #2
Aug 12, 2005 at 11:53 AM
Not everything is available through shell variables. You must look into your /proc filesystem to get more info about your harware.

Here's your shell script: hostinfo.sh
Code:
#!/bin/sh
# File hostinfo.sh (C) Anurag.

echo **** Host Info ****
echo -e "\n--- CPU Info ---"
cat /proc/cpuinfo | grep model
cat /proc/cpuinfo | grep MHz
echo -e "\n--- Memory Info ---"
cat /proc/meminfo | grep MemTotal
echo -e "\n--- USB Hubs ---"
lspci | grep USB
echo -e "\n--- Graphics Hardware ---"
lspci | grep VGA
echo -e "\n--- System Uptime ---"
uptime
echo -e "\n-- Kernel Version ---"
cat /proc/version
mediator
Aug 13, 2005 at 12:28 AM
that was nice,hanx!
desertwind
Aug 13, 2005 at 12:33 AM
GNUrag said:
# File hostinfo.sh (C) Anurag.

Hey Anurag, are you copyrighting it ???

Release it under GPL man :D