Script issues

#!/bin/bash

glist=`cat /etc/group | cut -d ":" -f1,4`
ulist=`cat /etc/passwd | cut -d ":" -f1,6`

for i in $glist
do
 echo "$glist"

done

for i in $ulist
do
 echo "$ulist"

done

chkgrp=`cat /etc/group | cut -d ":" -f1`
for a in chkgrp
do
if ["$a" =="$1"]
 then
 echo "group exist"

i manged to get the script running and now i`m getting this error massage. "-bash: ./600: line 24: syntax error: unexpected end of file"

"If" condition needs to be closed with "fi". try this

if ["$a" =="$1"]
then
echo "group exist"
fi

[/COLOR]

thanks but i`m still getting the same error.

Put set -x in second line after #!/bin/bash and post the complete output, thanks. Use code tags, thanks.

You would need spaces left around square brackets..

if [ "$a" == "$1" ]
then
        echo "group exist"
fi