אני לא מבין למה משהו ירצה להשתמש בBASH.
קוד:
SDF@moon ~/inetkey $ ls
test.cnf test.sh
SDF@moon ~/inetkey $ cat test.cnf
Users=40
Limits=30
Whatever=sdgsdg
SDF@moon ~/inetkey $ cat test.sh
#!/bin/bash
users=`awk -F"=" '/Users=[[:digit:]+]/ { print $2 }' test.cnf`
if [ $1 -le $users ] ; then
echo "OK"
else
echo "Not ok"
fi
SDF@moon ~/inetkey $ ./test.sh 40
OK
SDF@moon ~/inetkey $ ./test.sh 50
Not ok
SDF@moon ~/inetkey $