#!/bin/bash while read command ; do rsh $command snapmirror status done &1 | mail foo@example.com