mygroup=xsys
myb=1
while IFS=":" read GROUP other
do
if [ $GROUP = $mygroup ]
then
myb=0
break
fi
done < /etc/group && (( $myb == 0 )) && echo "$mygroup exists"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.