Richmond Pabilona wrote:
Hi guys,
I got this script from this list and named it querykernel.sh but everytime i would try to run it using ( $sh querykernel.sh) it gives me a command error.
#!/bin/sh
#
# The purpose of this script is to query which kernel
# is currently running on your system...
#
#
# July 25, 2003 by Ed Gurski (ed@xxxxxxxxxx)
#
KERNEL="`uname -r`" # Get the name of the current kernel
UPTIME="`uptime`" # Determine how long the system has been running
RPM="`rpm -qa|grep kernel\*|sort`" # Show all installed kernels on this system
clear
echo ""
echo $UPTIME|
while read a b c d e f
do
echo "As of $a the system has been up for $c days and $e hours"
done
echo "" echo "The running kernel is =====> $KERNEL" echo "" echo "The Kernels installed on this system are:" echo "$RPM" echo ""