newgrp starts a subshell with the group you specified. So that line in your script will not finish until that subshell is done.
The handling of
newgrp is also different if you're using
ksh implements it as a built-in command that is equivalent to
exec /usr/bin/newgrp [group]. So, like
newgrp never returns. (See some documentation here.)
If you want it to return, and want to execute commands in that subshell with changed group identity, you can use redirection.
echo "Before newgrp"
/usr/bin/newgrp users <<EONG
echo "hello from within newgrp"
echo "After newgrp"
/usr/bin/newgrp is called explicitly to avoid the implicit
ksh. The last command in that script will run within the original shell, with the original group identity.