Thread: weird output
View Single Post
Join Date: Oct 2007
Posts: 399
Reputation: eggi will become famous soon enough eggi will become famous soon enough 
Solved Threads: 47
eggi eggi is offline Offline
Posting Whiz

Re: weird output

 
0
  #2
Nov 11th, 2008
Hey there,

I think definitely you'll see some differences in performance. Solaris' sh is the bourne shell and a lot of linux/bsd distro's just like sh to bash or another shell.

The one thing I saw that jumped out at me was:

if ["$daOslgCap" -gt "90%"]

there may be 2 issues with this. Try padding spaces in between the [] and, possibly, check and see if there's an issue with the sense of your "if check", since "90%" is an alpha value and -gt is a unary comparison operator.

to add the spaces:
if [ "$daOslgCap" -gt "90%" ]
for the other part, you should clip the % from your value so you'll be checking if
$daOslgCap -gt 90
Hope that helps you get closer to an answer, if it doesn't answer the whole thing. If you could post the output of :

/bin/sh -x capChecker
that might shed some more light.

Best wishes,

Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
Reply With Quote