Ow Mun Heng writes:
$PORTFOLIO_SCRIPT --html > $TEMPFILE 2>/dev/null>&1
&& /usr/sbin/sendmail -t < $TEMPFILE && rm $TEMPFILE
Next, I think the above code can be enhanced by not using a tempfile.
perhaps a < EOF
Use a pipe:
$PORTFOLIO_SCRIPT --html | /usr/sbin/sendmail -t