cannot run script
Andrew Robert
arobert at townisp.com
Tue Mar 2 10:34:28 UTC 2004
I got the script to work just fine.
However, I would suggest you change the way you execute it.
Instead of using the command sh querykernel.sh, I recommend you chmod
the file so it is executable and run it direct.
An example of how to do this would be
$ chmod 755 querykernel.sh
$ ./querykernel.sh
The script runs but it takes a second for data to be displayed to screen
Thank you,
Andrew Robert
Principal Systems Analyst
TS&S Infrastructure Support
Massachusetts Financial Services
thedogfarted wrote:
> the script seems buggy (it doesn't displays some information
> correctly) but it didn't cause any errors
>
> 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 at gurski.com)
>> #
>> 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 ""
>>
>>
>
>
--
Thank you,
Andrew Robert
Principal Systems Analyst
TS&S Infrastructure Support - OpenVMS
Massachusetts Financial Services
Phone: (617) 954-5882
Pager: (781) 764-7321
E-mail: arobert at mfs.com
More information about the fedora-list
mailing list