#!/bin/sh 

user_groups=`/usr/bin/groups` 

if [[ $user_groups =~ "maintadmin" ]] 
then 
   if [ ! -w /bin/netstat ]
   then 
      /usr/bin/sudo /bin/netstat "$@"
   else 
      echo "You can not execute this command with write permissions!" 
   fi
else
   echo "You do not have the permissions to execute this command!" 
fi
