grep '<group-name>' /etc/group
The members of a group are listed after the third colon.
In a script, you could do something like:
Code:
#!/bin/bash
sed -n "/${1}/s/.*:.*:.*://p" /etc/group
Set the executable bit, and copy it to your $HOME/bin/. Now you have the command you want. A comma seperated list of the members is printed.