User:Ttoppi

From ICO wiki
Revision as of 21:51, 12 May 2011 by Ttoppi (talk | contribs) (Created page with ' #vaba väärtus, 0 liitmine et tuleks int vaba=$(($(free -m | grep Mem: | busybox awk '{ print $4}')+0)) # kontroll, et sisestatakse 0st suurem arv if [ $1 > 0 ]; then i…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
#vaba väärtus, 0 liitmine et tuleks int
vaba=$(($(free -m | grep Mem: | busybox awk '{ print $4}')+0))
# kontroll, et sisestatakse 0st suurem arv
if [ $1 > 0 ];
then
   if [ $vaba -gt $(($1+0)) ];
       then
           exit 0
   else
       exit 1
   fi
else
echo "Sisesta 0-st suurem arv"
fi