ok here we go!
I have an if statment with multiple 'or' conditions. The only problem is a can not get my if to see any of the or stantments past the first one!if [ "`logname`%" = "dev3%" or "`logname`%" = "devel1%" or "`logname`%" = "icdevel%" ]
then
if [ `who |grep $LOGNAME |wc -l` -gt 3 ]
then
echo "You will be disconnected due to too many logins plus 3"
sleep 5
exit
fi
the if picks up dev3 but not devel1 or icdevel!
I have an if statment with multiple 'or' conditions. The only problem is a can not get my if to see any of the or stantments past the first one!if [ "`logname`%" = "dev3%" or "`logname`%" = "devel1%" or "`logname`%" = "icdevel%" ]
then
if [ `who |grep $LOGNAME |wc -l` -gt 3 ]
then
echo "You will be disconnected due to too many logins plus 3"
sleep 5
exit
fi
the if picks up dev3 but not devel1 or icdevel!