In bash:
Code:
for i in `awk -F: '/^justin_/ {print $1}' /etc/passwd`; do echo deluser $i ; done
(be carefull with the quotes. There are two different types of them in previous command)
If you like the commands you see as output, remove the "echo" word so the commands are executed instead of printed to the screen.