Can any one help! I have written a script to test how many logins a user has to pur RS6000 box. This works fine if i needed only on user to have 3 logins but i need many users to have the use of 3 sessions. I need to use the or statment but i cant seem to get this to work!
here is my script!
#Checks logins to determine whether or not they have login in too many sessions
if [ ! "`logname`%" = "devel%" ]
then
if [ "`logname`%" = "dev3%" -o / {here is where i am have issues!}
"`logname`%" = "devel1%" ]
then
if [ `who |grep $LOGNAME |wc -l` -gt 3 ]
then
echo "You will be disconnected due to too many logins"
sleep 5
exit
fi
else
if [ `who |grep $LOGNAME |wc -l` -gt 1 ]
then
echo "You will be disconnected due to too many logins"
here is my script!
#Checks logins to determine whether or not they have login in too many sessions
if [ ! "`logname`%" = "devel%" ]
then
if [ "`logname`%" = "dev3%" -o / {here is where i am have issues!}
"`logname`%" = "devel1%" ]
then
if [ `who |grep $LOGNAME |wc -l` -gt 3 ]
then
echo "You will be disconnected due to too many logins"
sleep 5
exit
fi
else
if [ `who |grep $LOGNAME |wc -l` -gt 1 ]
then
echo "You will be disconnected due to too many logins"