#!/bin/sh if test $# -le 0 then ./umail student faculty grad staff guest else for i in $@ do ypcat passwd | grep "\<`ypcat group | grep "\<$i\>" | cut -d : -f 3`\>" | cut -d : -f 1 | sort > "$i"Emails ypcat passwd | grep "\<`ypcat group | grep "\<$i\>" | cut -d : -f 3`\>" | cut -d : -f 1,5 | sort > "$i"Names done fi