#! /usr/bin/ksh while read -r addr; do echo "mailx -s \"$1\" $addr <$3" mailx -s "$1" $addr <$3 done <$2