Search Results

Search: Posts Made By: alvintiow
10,231
Posted By Don Cragun
I'm still confused by this thread. With the...
I'm still confused by this thread. With the script you showed us, it should work just fine (with or without double quotes around the expansions of the variables your [[ expression ]] statements) if...
10,231
Posted By Aia
Does your Solaris system use the same version of...
Does your Solaris system use the same version of ksh?
ksh93 supports floating point. You do not need the external bc program
Something like
warn_level=$(( $str1 * 1.03 ))
Also, remove the quotes...
10,231
Posted By Aia
What version of ksh are you using? Is this a...
What version of ksh are you using?
Is this a Linux kernel base operating system?

if [[ "$crit_level" -gt "$str2" || "$crit_level" -gt "$str3" ]]; then
elif [[ "$warn_level" -gt "$str2" ||...
10,231
Posted By Don Cragun
As Aia noted, the version of the Korn shell...
As Aia noted, the version of the Korn shell you're using makes a big difference here. With a 1993 or later version of ksh, your code might work. I'm not sure in this case that the OS matters much,...
10,231
Posted By Aia
The OS would be significant, since the output of...
The OS would be significant, since the output of uptime is not the same.
Also, if it is a Linux kernel /proc/loadavg could be used instead of uptime.

cat /proc/loadavg
0.00 0.01 0.05 1/133 10331...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 01:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy